More Related Content Similar to Fundamentals of BI Report Testing - Module 2 (20) More from MichaelCalabrese20 (8) Fundamentals of BI Report Testing - Module 21. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
1 a software division of
QuerySurge™
Module 2
Principles of BI Report Testing
Data Validation
2. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
2 a software division of
QuerySurge™
Module Outline
− BI Report Visualization Accuracy
− Testing BI Report Data Validations
− BI Data Mappings
− Testing Data Transformations
− Validating Calculations, Aggregations and Formulas
3. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
3 a software division of
QuerySurge™
Testing BI Report Visualization Accuracy
Visualizations are a cornerstone of effective data communication. They have the unique ability to transform
complex data sets into comprehensible insights. Visualizations empower users to quickly grasp trends, patterns,
and outliers, making data-driven decision-making more accessible and efficient.
Testing BI report visualizations is paramount because these visual components are often the primary means through
which users interact with and interpret data. Ensuring the accuracy and reliability of visualizations is not just a matter of
aesthetics; it's about delivering trustworthy insights that drive informed decisions.
4. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
4 a software division of
QuerySurge™
Testing BI Report Data Transformations
Ensuring the accuracy of data representation in visual components is paramount. This involves verifying that the
information displayed in charts, graphs, and tables aligns precisely with the underlying data.
One of the fundamental techniques for testing data representation is visual comparison. Testers visually compare
the data presented in the report's visualizations with the source data. Any disparities or discrepancies are reported
as defects.
In most cases the source data will undergo some type of transformation before being displayed in a BI Report
visualization. The following section will be dedicated to understanding the different types of transformations that
can occur in a BI Report.
5. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
5 a software division of
QuerySurge™
BI Report Data Mapping
Data transformations that occur between the underlying data and the BI Report visualizations
should be defined in a Data Mapping document. In general, data mappings contain several key
components including:
• Mapping ID
o Unique ID that can be used to reference mappings in requirement documents, test cases, defects, etc.
• Source System(s) Information
o Report data can be sourced from a single location or several different areas. The source system information
will define which data sources including databases, data warehouses, data marts, files or streams from APIs
or data feeds.
• Target Report(s) Information
o This will define the dashboards, reports and ultimately the visualizations
that are populated with the source system data.
• Data transformation logic describes how the data is transformed when moving
from the underlying source systems to its visualization in the BI Report.
6. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
6 a software division of
QuerySurge™
Data Mapping Document
A data mapping document is frequently called a source-to-target map and is generally created in a spreadsheet.
This document acts as a central part of the functional requirements and data validation efforts:
Customer Info Report Data Mapping
Mapping Source System Source Table Source Column Source Type Transformation Logic Target Report Target Visualization Example Comments
1.1 XMART_DB customer CUSTOMER_ID(PK) Varchar (12) Direct Map Customer Info Info_table_viz 00148F
1.2 XMART_DB customer FIRST_NAME Varchar (255) Direct Map Customer Info Info_table_viz Noel
1.3 XMART_DB customer LAST_NAME Varchar (255) Direct Map Customer Info Info_table_viz Washington
1.4 XMART_DB customer JOIN DateTime Convert datetime to date Customer Info Date_chart_viz 2006-07-05
1.5 XMART_DB customer EMAIL_ADDRESS Varchar (255) Direct Map Customer Info Info_table_viz Noel_A_Smith@
querysurge.com
1.6 SALES_DB purchase ORDER_COST Decimal (25) Join on CUSTOMER_ID,
Sum All Purchases for all
customers
Customer Info TotalSale_card_viz $1,000,000 Rounded to
the nearest
dollar
7. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
7 a software division of
QuerySurge™
Transformation Types
• Transformations serve as the method through which raw source data gets
converted into meaningful insights within a BI Report.
• In the upcoming slides, we will outline various transformation types and discuss
how they can be applied to source data points to produce clear and intelligible BI
report visualizations.
8. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
8 a software division of
QuerySurge™
Selective column and row type
• Selecting only certain columns or rows to load or to omit from the load
• Example Requirements:
− Only load customers into the BI Report that have actually ordered a widget
9. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
9 a software division of
QuerySurge™
Selective column and row type – Example
CUSTOMER_ID FIRST_NAME CREATED_ON WIDGET_ORDERED
1Cathleen 6/10/2020 1
2Gabriel 4/15/2020 6
3Jeanne 5/15/2020 0
4John 12/10/2020 0
5Bobby 10/20/2020 1
Source Data BI Report
10. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
10 a software division of
QuerySurge™
Translation
• Translating coded values to their actual values.
− Examples:
• 0 and 1 translate to True and False
• Zip Codes translate to Cities
• Country phone codes translate to Countries
− Example Requirements:
• Translate Zip Codes to Cities from source ZIP_CODE field to target CITY field
• Translate Active flag from 0 and 1 to True and False from source ACTIVE field to target
IS_ACTIVE field
11. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
11 a software division of
QuerySurge™
Translation - Example
CUSTOMER_ID FIRST_NAME ZIP_CODE ACTIVE
1 Cathleen 7470 1
2 Gabriel 30022 1
3 Jeanne 30075 0
4 John 10017 0
5 Bobby 10017 1
Source Data BI Report
12. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
12 a software division of
QuerySurge™
Lookups
• Similar to translation except they rely on mappings to
their expected values, usually defined in a lookup table.
• Encoding free-form values
− Examples:
• Mapping ‘F’ to ‘Female’
• Mapping ‘NJ’ to ‘New Jersey’
− Example Requirement:
• Lookup Customer value in source CUS_VALUE field and map to target VALUE field using
lookup table Customer_Value
13. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
13 a software division of
QuerySurge™
Lookup - Example
Customer_Value (Lookup Table)
CUS_VALUE VALUE
Low Normal
Medium Important
High Very Important
Critical Super Important
CUSTOMER_ID FIRST_NAME CUS_VALUE
1 Cathleen Low
2 Gabriel High
3 Jeanne Medium
4 John Critical
5 Bobby Low
Source Data BI Report
14. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
14 a software division of
QuerySurge™
Transpose
• Convert columns into rows or vice versa
− Example Requirement:
• Populate target visualization with a single row for SALES data with
each column representing a MONTH.
15. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
15 a software division of
QuerySurge™
Transpose - Example
MONTH SALES
Jan $100
Feb $200
Mar $150
Apr $300
Jun $100
Jul $175
Source Data BI Report
16. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
16 a software division of
QuerySurge™
Field Splitting
• Splitting a single source field into multiple target fields
− Examples:
• Name field that contains both first and last name
• A single City and State field
− Example requirement:
• Split source field CUSTOMER_NAME in two by splitting on ‘, ’ and populate the
first item in target field LAST and second item in target field FIRST
17. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
17 a software division of
QuerySurge™
Field Splitting - Example
CUSTOMER_ID CUSTOMER_NAME
1 Smith, Cathleen
2 Jones, Gabriel
3 April, Jeanne
4 Hayes, John
5 Holmes, Bobby
Source Data BI Report
18. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
18 a software division of
QuerySurge™
Field Merging
• Combining multiple source fields into a single target field
• Opposite of Splitting
− Examples:
• Combine street, city, and state into a single field
• Combine first name, middle name, and last name into a single field
− Example requirement:
• Combine source STREET, CITY, STATE into target field ADDRESS using the following syntax:
− STREET + ‘, ‘ + CITY + ‘, ’ + STATE
19. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
19 a software division of
QuerySurge™
Field Merging - Example
CUSTOMER_ID STREET CITY STATE
1 4 Jackson Rd Wayne NJ
2 18 Wesley Rd Roswell GA
3 47 Smith Ln Alpharetta GA
Source Data
BI Report
20. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
20 a software division of
QuerySurge™
Verifying Calculations, Aggregations, and Formulas
Calculations are at the core of most BI reports. They involve manipulating data to derive meaningful insights.
These calculations can range from simple arithmetic operations to complex mathematical functions.
Aggregations Explained: Aggregations involve summarizing data, typically through operations like
summing, averaging, counting, or finding minimum/maximum values. Aggregations play a
significant role in presenting data at different levels of granularity.
Formulas and Expressions: Formulas and expressions allow users to create custom calculations
based on existing data. This flexibility is crucial for tailoring reports to specific business needs.
Testing Strategies: To verify calculations, aggregations, and formulas, we use a combination of
manual and automated testing approaches. Manual validation involves reviewing reports to
confirm that calculations are correct, while automated testing can include the use of scripts to
perform calculations and compare results.
21. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
21 a software division of
QuerySurge™
Aggregation Summation
• Aggregation summation, commonly known as "sum," is a data transformation process that calculates the
total or sum of numeric values within a dataset. It's used to find the combined value of a specific field or
column, often representing the cumulative effect of those values.
• Examples:
− In financial analysis, you might use aggregation summation to calculate the total revenue from sales
− Display the total sum of expenses for a division
− Report on the overall company budget
Example requirement:
− Sum the total sales for each category (Bike, Clothing, Accesories and Components), Sum the total sales
for each reseller category, provide total over sum of all sales.
22. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
22 a software division of
QuerySurge™
Aggregation Summation - Example
Source Data
BI Report
Category Business Type Total Product Cost
Accessories Value Added Reseller $52.35
Accessories Specialty Bike Shop $1,251.98
Accessories Warehouse $2,963.88
Clothing Value Added Reseller $124.72
Clothing Specialty Bike Shop $922.89
Bikes Warehouse $755.15
Bikes Value Added Reseller $95.00
Bikes Specialty Bike Shop $1,481.94
… … …
Components Warehouse $4,445.81
Components Value Added Reseller $34.61
23. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
23 a software division of
QuerySurge™
Aggregation Counts
• An aggregation count is a data transformation operation that calculates the number of records or data points
that meet a specific condition.
• Examples:
− Determine the number of customers in a particular city
− Quantity of sold products
− Occurrences of an event within a dataset
Example requirement:
− Calculate total new customers for each month of the year
24. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
24 a software division of
QuerySurge™
Aggregation Count - Example
CUSTOMER_ID FIRST_NAME CREATED_ON
1 Cathleen 6/10/2023
2 Gabriel 4/15/2023
3 Jeanne 9/6/2023
4 John 12/10/2023
5 Marvin 6/12/2023
6 Collin 7/15/2023
7 Sam 8/1/2023
8 Eunice 7/15/2023
9 Mary 7/17/2023
10 Chris 7/19/2023
Source Data BI Report
25. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
25 a software division of
QuerySurge™
Aggregation Max/Min
• Aggregation "max" and "min" are data operations that help identify the maximum and minimum values
within a dataset, respectively. They provide critical insights for decision-making, identifying outliers, and
establishing data boundaries
• Max finds the highest value in a particular field or column
• Min locates the lowest value.
• Examples:
− Highest and lowest temperatures in a weather dataset
− Highest and lowest prices for a product over a period
Example requirement:
− Display the maximum price and the minimum price of the current items in inventory.
26. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
26 a software division of
QuerySurge™
Aggregation Min/Max - Example
Source Data BI Report
Item Product_Standard_Cost
MountainBike-200 $2,171.29
MountainBIke-100 $1,912.15
LL Road Frame $605.65
Road-150 $204.63
LL Road Front Wheel $199.85
HL Road Rear Wheel $110.28
LL Fork $104.80
HG Fork $101.89
Classic Vest $92.81
27. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
27 a software division of
QuerySurge™
Formulas and Expressions
In addition to aggregations, various types of formula and calculated transformations can occur between the
source data and a Business Intelligence (BI) reports. Some common examples include:
Percentage Calculations: Determining percentages or ratios to analyze data in terms of proportions,
growth rates, or contributions.
Weighted Averages: Calculating averages with different weights for various data points, often used
in scenarios like weighted customer satisfaction scores.
Conditional Calculations: Applying calculations based on certain conditions or logical rules. For
example, calculating bonuses for salespeople based on their sales performance.
Derived Metrics: Creating new metrics by combining existing ones. For example, calculating profit
margin by subtracting the cost from revenue.
28. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
28 a software division of
QuerySurge™
Formulas and Expressions (Cont.)
• Time-Based Calculations: Calculations related to time, such as calculating year-over-year growth, quarter-to-
date totals, or moving averages.
• Currency Conversion: Converting monetary values from one currency to another, taking into account
exchange rates.
• Custom Formulas: Creating custom mathematical or logical formulas to derive specific insights, for instance, a
custom scoring formula for customer segmentation.
• Complex Calculations: Performing complex mathematical or statistical calculations, such as regression
analysis, predictive modeling, or machine learning algorithms.
• Time Series Analysis: Analyzing time-based data using methods like exponential smoothing, trend analysis, or
seasonality adjustments.
• Normalization: Standardizing data by scaling it to fit within a particular range, making it easier to compare
and analyze.
29. © 2019 Real-Time Technology Solutions, Inc.
22 West 38th Street FL 11, New York, NY 10018
www.rttsweb.com | (212) 240-9050
29 a software division of
QuerySurge™
Summary
• Visualizations are a cornerstone of effective data communication. Ensuring the accuracy and reliability of
visualizations is not just a matter of aesthetics; it's about delivering trustworthy insights that drive informed
decisions.
• In most cases the source data will undergo some type of transformation before being displayed in a BI Report
visualization.
• Data transformations that occur between the underlying data and the BI Report visualizations should be
defined in a Data Mapping document
• Calculations are at the core of most BI reports. They involve manipulating data to derive meaningful insights.
These calculations can range from simple arithmetic operations to complex mathematical functions.
Editor's Notes In this Transpose example, souce Data is stored in a table where there are two columns. One for Month and one for Sales numbers. On the BI report the source data has been transposed such that each month represents a column and a single row which contains the sales data is presented under each month.