SlideShare a Scribd company logo
Power BI Tips
and Timesavers
Calculated Columns
And
Measures in Power BI
A guide to understanding the differences between calculated columns and
measures in DAX for Power BI
What is a calculated column?
A calculated column is a static value added to a table, calculated row by row when you load
the data.
What is a measure?
A measure is a dynamic value that changes based on what you’re looking at in a report,
calculated dynamically within the filter context of a visual
We will use a Gross Profit Example
We start by loading some sample sales data
How to create a calculated column
The first thing we will do is to calculate the Gross Profit for each row in this table
In the table view, select New Column from the Ribbon
How to create a calculated column
In the formula bar we type
Gross Profit = [Sales Value]-[Cost of Sales]
This adds a new column, which calculates the gross profit by subtracting the cost of sales from the sales value
When we press enter the column is added to the table, and it is calculated for each row of data in that table
We also create a Gross Profit Margin calculated column
Benefits & Limitations
Benefits of Calculated Columns in Power BI
One of the most obvious benefits of creating a calculated column in a table is that is easily visible and can be quickly
understood.
It is calculated once the data refreshes and is not affected by any other filters, effectively it is a static column. This means
that it can be used as a filter. In our example we could use a slicer to only show products that have a margin lower than
60%
Limitations of Calculated Columns in Power BI
Potentially the biggest draw back of calculated columns is that they must be calculated in full before the data table can be
used. This is usually not a problem if the data tables are small, but if you import a very large data table, then have complex
calculations running down a number of columns you will see a performance impact.
In that case it is often better to perform the calculation further back in the data transformation
How to create a measure
We want to create a measure that can calculate the overall gross profit margin, even if the report is filtered
To create the measure, go to the Table View, and click New Measure on the ribbon
Then copy and paste this DAX code
Gross Profit Margin (Measure) = sum(Sheet1[Gross Profit]) / sum(Sheet1[Sales Value])
When you press enter, the measure is created. But unlike the calculated column, it does not appear in the table view
Benefits of Measures in Power BI
Measures are only calculated where used and are only calculated in the context of the face value of the report, this way
they respond to filters and slicers
Limitations of Measures in Power BI
Measures can be more difficult to debug as they are more difficult to understand than a calculated column. But it can be
made simpler to understand by creating separate measures for elements of a complex calculation. For example in this
example we could create a measure for the sum of gross profit (the numerator) and check that. And we could also create a
measure for the sum of the Sales (the denominator) and check that. Out gross profit measure could then just be the
Numerator / the Denominator allowing us to debug the components separately
On the report view, drag a table to the canvas
Then add product, Sales Value, Cost of Sales and the calculated column for Gross Profit to the table
But, if we add the Gross profit percentage that we created as a calculated column to the table we get a problem, the
default summarisation options cannot calculate the true gross profit
Using calculated columns and
measures in reports
Although this initially looks correct, especially at the product row level, but the grand total is not correct
The correct answer should be 1290 divided by 2110, which equals 61.14%
The measure correctly calculates the Gross Profit percentage on the overall values and all rows in the report
Use the measure to show the gross
profit margin
We can use the calculated column values to filter the data for rows with a lower margin
Please note you cannot use a measure value in a slicer because you need to see the individual rows
Use the Calculated Column values if
you need to filter
We have explained the key differences between calculated columns and
measures in Power BI,
With examples of why you will need to use both and some of the
common errors that we see
For more Tips, Tricks and
Timesavers, visit our website
Business Analytics Blog – Select Distinct
Credit: simon.harrison@selectdistinct.co.uk

More Related Content

Similar to Calculated Columns and Measures in Power BI.pptx

Print18
Print18Print18
Print18
Hassan Samoon
 
Business Analytics 1 Module 4.pdf
Business Analytics 1 Module 4.pdfBusiness Analytics 1 Module 4.pdf
Business Analytics 1 Module 4.pdf
Jayanti Pande
 
1 Mashing Up Data with PowerPivot When Filter, .docx
1 Mashing Up Data with PowerPivot  When Filter, .docx1 Mashing Up Data with PowerPivot  When Filter, .docx
1 Mashing Up Data with PowerPivot When Filter, .docx
karisariddell
 
Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Compu...
Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Compu...Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Compu...
Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Compu...
Cengage Learning
 
Empowerment Technology Lesson 4
Empowerment Technology Lesson 4Empowerment Technology Lesson 4
Empowerment Technology Lesson 4
alicelagajino
 
Create a PivotTable to analyze worksheet data.pdf
Create a PivotTable to analyze worksheet data.pdfCreate a PivotTable to analyze worksheet data.pdf
Create a PivotTable to analyze worksheet data.pdf
Abubakar Bashir
 
Lesson 18 Creating Pivot Tables
Lesson 18 Creating Pivot TablesLesson 18 Creating Pivot Tables
Lesson 18 Creating Pivot Tables
guevarra_2000
 
Funções DAX.pdf
Funções DAX.pdfFunções DAX.pdf
Funções DAX.pdf
Joao Vaz
 
How to Navigate PerformancePoint 2010 Dashboards and Explore Data - EPC Group
How to Navigate PerformancePoint 2010 Dashboards and Explore Data - EPC GroupHow to Navigate PerformancePoint 2010 Dashboards and Explore Data - EPC Group
How to Navigate PerformancePoint 2010 Dashboards and Explore Data - EPC Group
EPC Group
 
06 web-analytics tabbed-report-menus
06 web-analytics tabbed-report-menus06 web-analytics tabbed-report-menus
06 web-analytics tabbed-report-menus
Massimo Paolini
 
The Ultimate Guide to Ad5 e808 adobe audience manager business practitioner e...
The Ultimate Guide to Ad5 e808 adobe audience manager business practitioner e...The Ultimate Guide to Ad5 e808 adobe audience manager business practitioner e...
The Ultimate Guide to Ad5 e808 adobe audience manager business practitioner e...
PennyJose1
 
How to use a slicer to toggle measures in Power BI
How to use a slicer to toggle measures in Power BIHow to use a slicer to toggle measures in Power BI
How to use a slicer to toggle measures in Power BI
Select Distinct Limited
 
Creating modeled views
Creating modeled viewsCreating modeled views
Creating modeled views
Emerson Carlos Rocha
 
Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020
Adhi Wikantyoso
 
Oracle General Ledger GL FSG
Oracle General Ledger GL FSG Oracle General Ledger GL FSG
Oracle General Ledger GL FSG
Rizwan Ali Qumbrani
 
Calculations for your Equity Analysis assignmentTo start, put .docx
Calculations for your Equity Analysis assignmentTo start, put .docxCalculations for your Equity Analysis assignmentTo start, put .docx
Calculations for your Equity Analysis assignmentTo start, put .docx
RAHUL126667
 
What is copa master data
What is copa master dataWhat is copa master data
What is copa master data
Rajeev Kumar
 
Microsoft Excel Tutorial
Microsoft Excel TutorialMicrosoft Excel Tutorial
Microsoft Excel Tutorial
Kristine Tiongco-Rimpa
 
Dwh training 1
Dwh training 1Dwh training 1
Dwh training 1
Saugata Sarkar
 
Calculation contexts in web i
Calculation contexts in web iCalculation contexts in web i
Calculation contexts in web i
Venkata Mahesh
 

Similar to Calculated Columns and Measures in Power BI.pptx (20)

Print18
Print18Print18
Print18
 
Business Analytics 1 Module 4.pdf
Business Analytics 1 Module 4.pdfBusiness Analytics 1 Module 4.pdf
Business Analytics 1 Module 4.pdf
 
1 Mashing Up Data with PowerPivot When Filter, .docx
1 Mashing Up Data with PowerPivot  When Filter, .docx1 Mashing Up Data with PowerPivot  When Filter, .docx
1 Mashing Up Data with PowerPivot When Filter, .docx
 
Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Compu...
Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Compu...Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Compu...
Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Compu...
 
Empowerment Technology Lesson 4
Empowerment Technology Lesson 4Empowerment Technology Lesson 4
Empowerment Technology Lesson 4
 
Create a PivotTable to analyze worksheet data.pdf
Create a PivotTable to analyze worksheet data.pdfCreate a PivotTable to analyze worksheet data.pdf
Create a PivotTable to analyze worksheet data.pdf
 
Lesson 18 Creating Pivot Tables
Lesson 18 Creating Pivot TablesLesson 18 Creating Pivot Tables
Lesson 18 Creating Pivot Tables
 
Funções DAX.pdf
Funções DAX.pdfFunções DAX.pdf
Funções DAX.pdf
 
How to Navigate PerformancePoint 2010 Dashboards and Explore Data - EPC Group
How to Navigate PerformancePoint 2010 Dashboards and Explore Data - EPC GroupHow to Navigate PerformancePoint 2010 Dashboards and Explore Data - EPC Group
How to Navigate PerformancePoint 2010 Dashboards and Explore Data - EPC Group
 
06 web-analytics tabbed-report-menus
06 web-analytics tabbed-report-menus06 web-analytics tabbed-report-menus
06 web-analytics tabbed-report-menus
 
The Ultimate Guide to Ad5 e808 adobe audience manager business practitioner e...
The Ultimate Guide to Ad5 e808 adobe audience manager business practitioner e...The Ultimate Guide to Ad5 e808 adobe audience manager business practitioner e...
The Ultimate Guide to Ad5 e808 adobe audience manager business practitioner e...
 
How to use a slicer to toggle measures in Power BI
How to use a slicer to toggle measures in Power BIHow to use a slicer to toggle measures in Power BI
How to use a slicer to toggle measures in Power BI
 
Creating modeled views
Creating modeled viewsCreating modeled views
Creating modeled views
 
Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020
 
Oracle General Ledger GL FSG
Oracle General Ledger GL FSG Oracle General Ledger GL FSG
Oracle General Ledger GL FSG
 
Calculations for your Equity Analysis assignmentTo start, put .docx
Calculations for your Equity Analysis assignmentTo start, put .docxCalculations for your Equity Analysis assignmentTo start, put .docx
Calculations for your Equity Analysis assignmentTo start, put .docx
 
What is copa master data
What is copa master dataWhat is copa master data
What is copa master data
 
Microsoft Excel Tutorial
Microsoft Excel TutorialMicrosoft Excel Tutorial
Microsoft Excel Tutorial
 
Dwh training 1
Dwh training 1Dwh training 1
Dwh training 1
 
Calculation contexts in web i
Calculation contexts in web iCalculation contexts in web i
Calculation contexts in web i
 

More from Select Distinct Limited

Euro 2024 Predictions - Quarter Final Results.pptx
Euro 2024 Predictions - Quarter Final Results.pptxEuro 2024 Predictions - Quarter Final Results.pptx
Euro 2024 Predictions - Quarter Final Results.pptx
Select Distinct Limited
 
Euro 2024 Predictions - Round of 16 Results.pptx
Euro 2024 Predictions - Round of 16 Results.pptxEuro 2024 Predictions - Round of 16 Results.pptx
Euro 2024 Predictions - Round of 16 Results.pptx
Select Distinct Limited
 
Euro 2024 Predictions - Group Stage Results.pptx
Euro 2024 Predictions - Group Stage Results.pptxEuro 2024 Predictions - Group Stage Results.pptx
Euro 2024 Predictions - Group Stage Results.pptx
Select Distinct Limited
 
Euro 2024 Predictions - Group Stage Outcomes
Euro 2024 Predictions - Group Stage OutcomesEuro 2024 Predictions - Group Stage Outcomes
Euro 2024 Predictions - Group Stage Outcomes
Select Distinct Limited
 
Year on Year Comparison in Power BI.pptx
Year on Year Comparison in Power BI.pptxYear on Year Comparison in Power BI.pptx
Year on Year Comparison in Power BI.pptx
Select Distinct Limited
 
Sync Slicers in Power BI a step by step guide
Sync Slicers in Power BI a step by step guideSync Slicers in Power BI a step by step guide
Sync Slicers in Power BI a step by step guide
Select Distinct Limited
 
Using Google Search Console Data in Power BI.pptx
Using Google Search Console Data in Power BI.pptxUsing Google Search Console Data in Power BI.pptx
Using Google Search Console Data in Power BI.pptx
Select Distinct Limited
 
Data Lake v Data Warehouse. What is the difference?
Data Lake v Data Warehouse. What is the difference?Data Lake v Data Warehouse. What is the difference?
Data Lake v Data Warehouse. What is the difference?
Select Distinct Limited
 
How to Create Drop Down Lists in Excel, step by step
How to Create Drop Down Lists in Excel, step by stepHow to Create Drop Down Lists in Excel, step by step
How to Create Drop Down Lists in Excel, step by step
Select Distinct Limited
 
Top 5 SQL Tips and Timesaver 2023, our most popular posts
Top 5 SQL Tips and Timesaver 2023, our most popular postsTop 5 SQL Tips and Timesaver 2023, our most popular posts
Top 5 SQL Tips and Timesaver 2023, our most popular posts
Select Distinct Limited
 
Top 5 Power BI tips 2023 most popular blog posts
Top 5 Power BI tips 2023 most popular blog postsTop 5 Power BI tips 2023 most popular blog posts
Top 5 Power BI tips 2023 most popular blog posts
Select Distinct Limited
 
CTEs in SQL.pptx
CTEs in SQL.pptxCTEs in SQL.pptx
CTEs in SQL.pptx
Select Distinct Limited
 
Divide by Zero Errors
Divide by Zero ErrorsDivide by Zero Errors
Divide by Zero Errors
Select Distinct Limited
 
When to transform data for Power BI.pptx
When to transform data for Power BI.pptxWhen to transform data for Power BI.pptx
When to transform data for Power BI.pptx
Select Distinct Limited
 
Power BI KPIs
Power BI KPIsPower BI KPIs
Direction of travel on a map in Power BI.pptx
Direction of travel on a map in Power BI.pptxDirection of travel on a map in Power BI.pptx
Direction of travel on a map in Power BI.pptx
Select Distinct Limited
 
UNION in DAX
UNION in DAXUNION in DAX
APPEND data in Power Query
APPEND data in Power QueryAPPEND data in Power Query
APPEND data in Power Query
Select Distinct Limited
 
Power BI Connect to Google BigQuery.pptx
Power BI Connect to Google BigQuery.pptxPower BI Connect to Google BigQuery.pptx
Power BI Connect to Google BigQuery.pptx
Select Distinct Limited
 
Group by ROLLUP in SQL Server
Group by ROLLUP in SQL ServerGroup by ROLLUP in SQL Server
Group by ROLLUP in SQL Server
Select Distinct Limited
 

More from Select Distinct Limited (20)

Euro 2024 Predictions - Quarter Final Results.pptx
Euro 2024 Predictions - Quarter Final Results.pptxEuro 2024 Predictions - Quarter Final Results.pptx
Euro 2024 Predictions - Quarter Final Results.pptx
 
Euro 2024 Predictions - Round of 16 Results.pptx
Euro 2024 Predictions - Round of 16 Results.pptxEuro 2024 Predictions - Round of 16 Results.pptx
Euro 2024 Predictions - Round of 16 Results.pptx
 
Euro 2024 Predictions - Group Stage Results.pptx
Euro 2024 Predictions - Group Stage Results.pptxEuro 2024 Predictions - Group Stage Results.pptx
Euro 2024 Predictions - Group Stage Results.pptx
 
Euro 2024 Predictions - Group Stage Outcomes
Euro 2024 Predictions - Group Stage OutcomesEuro 2024 Predictions - Group Stage Outcomes
Euro 2024 Predictions - Group Stage Outcomes
 
Year on Year Comparison in Power BI.pptx
Year on Year Comparison in Power BI.pptxYear on Year Comparison in Power BI.pptx
Year on Year Comparison in Power BI.pptx
 
Sync Slicers in Power BI a step by step guide
Sync Slicers in Power BI a step by step guideSync Slicers in Power BI a step by step guide
Sync Slicers in Power BI a step by step guide
 
Using Google Search Console Data in Power BI.pptx
Using Google Search Console Data in Power BI.pptxUsing Google Search Console Data in Power BI.pptx
Using Google Search Console Data in Power BI.pptx
 
Data Lake v Data Warehouse. What is the difference?
Data Lake v Data Warehouse. What is the difference?Data Lake v Data Warehouse. What is the difference?
Data Lake v Data Warehouse. What is the difference?
 
How to Create Drop Down Lists in Excel, step by step
How to Create Drop Down Lists in Excel, step by stepHow to Create Drop Down Lists in Excel, step by step
How to Create Drop Down Lists in Excel, step by step
 
Top 5 SQL Tips and Timesaver 2023, our most popular posts
Top 5 SQL Tips and Timesaver 2023, our most popular postsTop 5 SQL Tips and Timesaver 2023, our most popular posts
Top 5 SQL Tips and Timesaver 2023, our most popular posts
 
Top 5 Power BI tips 2023 most popular blog posts
Top 5 Power BI tips 2023 most popular blog postsTop 5 Power BI tips 2023 most popular blog posts
Top 5 Power BI tips 2023 most popular blog posts
 
CTEs in SQL.pptx
CTEs in SQL.pptxCTEs in SQL.pptx
CTEs in SQL.pptx
 
Divide by Zero Errors
Divide by Zero ErrorsDivide by Zero Errors
Divide by Zero Errors
 
When to transform data for Power BI.pptx
When to transform data for Power BI.pptxWhen to transform data for Power BI.pptx
When to transform data for Power BI.pptx
 
Power BI KPIs
Power BI KPIsPower BI KPIs
Power BI KPIs
 
Direction of travel on a map in Power BI.pptx
Direction of travel on a map in Power BI.pptxDirection of travel on a map in Power BI.pptx
Direction of travel on a map in Power BI.pptx
 
UNION in DAX
UNION in DAXUNION in DAX
UNION in DAX
 
APPEND data in Power Query
APPEND data in Power QueryAPPEND data in Power Query
APPEND data in Power Query
 
Power BI Connect to Google BigQuery.pptx
Power BI Connect to Google BigQuery.pptxPower BI Connect to Google BigQuery.pptx
Power BI Connect to Google BigQuery.pptx
 
Group by ROLLUP in SQL Server
Group by ROLLUP in SQL ServerGroup by ROLLUP in SQL Server
Group by ROLLUP in SQL Server
 

Recently uploaded

SAMPLE PRODUCT RESEARCH PR - strikingly.pptx
SAMPLE PRODUCT RESEARCH PR - strikingly.pptxSAMPLE PRODUCT RESEARCH PR - strikingly.pptx
SAMPLE PRODUCT RESEARCH PR - strikingly.pptx
wojakmodern
 
From Signals to Solutions: Effective Strategies for CDR Analysis in Fraud Det...
From Signals to Solutions: Effective Strategies for CDR Analysis in Fraud Det...From Signals to Solutions: Effective Strategies for CDR Analysis in Fraud Det...
From Signals to Solutions: Effective Strategies for CDR Analysis in Fraud Det...
Milind Agarwal
 
Annex K RBF's The World Game pdf document
Annex K RBF's The World Game pdf documentAnnex K RBF's The World Game pdf document
Annex K RBF's The World Game pdf document
Steven McGee
 
The Rise of Python in Finance,Automating Trading Strategies: _.pdf
The Rise of Python in Finance,Automating Trading Strategies: _.pdfThe Rise of Python in Finance,Automating Trading Strategies: _.pdf
The Rise of Python in Finance,Automating Trading Strategies: _.pdf
Riya Sen
 
future-of-asset-management-future-of-asset-management
future-of-asset-management-future-of-asset-managementfuture-of-asset-management-future-of-asset-management
future-of-asset-management-future-of-asset-management
Aadee4
 
Acid Base Practice Test 4- KEY.pdfkkjkjk
Acid Base Practice Test 4- KEY.pdfkkjkjkAcid Base Practice Test 4- KEY.pdfkkjkjk
Acid Base Practice Test 4- KEY.pdfkkjkjk
talha2khan2k
 
Technology used in Ott data analysis project
Technology used in Ott data analysis  projectTechnology used in Ott data analysis  project
Technology used in Ott data analysis project
49AkshitYadav
 
Bimbingan kaunseling untuk pelajar IPTA/IPTS di Malaysia
Bimbingan kaunseling untuk pelajar IPTA/IPTS di MalaysiaBimbingan kaunseling untuk pelajar IPTA/IPTS di Malaysia
Bimbingan kaunseling untuk pelajar IPTA/IPTS di Malaysia
aznidajailani
 
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion dataTowards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
Samuel Jackson
 
Cal Girls The Lalit Jaipur 8445551418 Khusi Top Class Girls Call Jaipur Avail...
Cal Girls The Lalit Jaipur 8445551418 Khusi Top Class Girls Call Jaipur Avail...Cal Girls The Lalit Jaipur 8445551418 Khusi Top Class Girls Call Jaipur Avail...
Cal Girls The Lalit Jaipur 8445551418 Khusi Top Class Girls Call Jaipur Avail...
deepikakumaridk25
 
Combined supervised and unsupervised neural networks for pulse shape discrimi...
Combined supervised and unsupervised neural networks for pulse shape discrimi...Combined supervised and unsupervised neural networks for pulse shape discrimi...
Combined supervised and unsupervised neural networks for pulse shape discrimi...
Samuel Jackson
 
Data Analytics for Decision Making By District 11 Solutions
Data Analytics for Decision Making By District 11 SolutionsData Analytics for Decision Making By District 11 Solutions
Data Analytics for Decision Making By District 11 Solutions
District 11 Solutions
 
Unit 1 Introduction to DATA SCIENCE .pptx
Unit 1 Introduction to DATA SCIENCE .pptxUnit 1 Introduction to DATA SCIENCE .pptx
Unit 1 Introduction to DATA SCIENCE .pptx
Priyanka Jadhav
 
Big Data and Analytics Shaping the future of Payments
Big Data and Analytics Shaping the future of PaymentsBig Data and Analytics Shaping the future of Payments
Big Data and Analytics Shaping the future of Payments
RuchiRathor2
 
SFBA Splunk Usergroup meeting July 17, 2024
SFBA Splunk Usergroup meeting July 17, 2024SFBA Splunk Usergroup meeting July 17, 2024
SFBA Splunk Usergroup meeting July 17, 2024
Becky Burwell
 
393947940-The-Dell-EMC-PowerMax-Family-Overview.pdf
393947940-The-Dell-EMC-PowerMax-Family-Overview.pdf393947940-The-Dell-EMC-PowerMax-Family-Overview.pdf
393947940-The-Dell-EMC-PowerMax-Family-Overview.pdf
Ladislau5
 
Cal Girls Hotel Safari Jaipur | | Girls Call Free Drop Service
Cal Girls Hotel Safari Jaipur | | Girls Call Free Drop ServiceCal Girls Hotel Safari Jaipur | | Girls Call Free Drop Service
Cal Girls Hotel Safari Jaipur | | Girls Call Free Drop Service
Deepikakumari457585
 
CT AnGIOGRAPHY of pulmonary embolism.pptx
CT AnGIOGRAPHY of pulmonary embolism.pptxCT AnGIOGRAPHY of pulmonary embolism.pptx
CT AnGIOGRAPHY of pulmonary embolism.pptx
RejoJohn2
 
Vrinda store data analysis project using Excel
Vrinda store data analysis project using ExcelVrinda store data analysis project using Excel
Vrinda store data analysis project using Excel
SantuJana12
 
Histology of Muscle types histology o.ppt
Histology of Muscle types histology o.pptHistology of Muscle types histology o.ppt
Histology of Muscle types histology o.ppt
SamanArshad11
 

Recently uploaded (20)

SAMPLE PRODUCT RESEARCH PR - strikingly.pptx
SAMPLE PRODUCT RESEARCH PR - strikingly.pptxSAMPLE PRODUCT RESEARCH PR - strikingly.pptx
SAMPLE PRODUCT RESEARCH PR - strikingly.pptx
 
From Signals to Solutions: Effective Strategies for CDR Analysis in Fraud Det...
From Signals to Solutions: Effective Strategies for CDR Analysis in Fraud Det...From Signals to Solutions: Effective Strategies for CDR Analysis in Fraud Det...
From Signals to Solutions: Effective Strategies for CDR Analysis in Fraud Det...
 
Annex K RBF's The World Game pdf document
Annex K RBF's The World Game pdf documentAnnex K RBF's The World Game pdf document
Annex K RBF's The World Game pdf document
 
The Rise of Python in Finance,Automating Trading Strategies: _.pdf
The Rise of Python in Finance,Automating Trading Strategies: _.pdfThe Rise of Python in Finance,Automating Trading Strategies: _.pdf
The Rise of Python in Finance,Automating Trading Strategies: _.pdf
 
future-of-asset-management-future-of-asset-management
future-of-asset-management-future-of-asset-managementfuture-of-asset-management-future-of-asset-management
future-of-asset-management-future-of-asset-management
 
Acid Base Practice Test 4- KEY.pdfkkjkjk
Acid Base Practice Test 4- KEY.pdfkkjkjkAcid Base Practice Test 4- KEY.pdfkkjkjk
Acid Base Practice Test 4- KEY.pdfkkjkjk
 
Technology used in Ott data analysis project
Technology used in Ott data analysis  projectTechnology used in Ott data analysis  project
Technology used in Ott data analysis project
 
Bimbingan kaunseling untuk pelajar IPTA/IPTS di Malaysia
Bimbingan kaunseling untuk pelajar IPTA/IPTS di MalaysiaBimbingan kaunseling untuk pelajar IPTA/IPTS di Malaysia
Bimbingan kaunseling untuk pelajar IPTA/IPTS di Malaysia
 
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion dataTowards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
Towards an Analysis-Ready, Cloud-Optimised service for FAIR fusion data
 
Cal Girls The Lalit Jaipur 8445551418 Khusi Top Class Girls Call Jaipur Avail...
Cal Girls The Lalit Jaipur 8445551418 Khusi Top Class Girls Call Jaipur Avail...Cal Girls The Lalit Jaipur 8445551418 Khusi Top Class Girls Call Jaipur Avail...
Cal Girls The Lalit Jaipur 8445551418 Khusi Top Class Girls Call Jaipur Avail...
 
Combined supervised and unsupervised neural networks for pulse shape discrimi...
Combined supervised and unsupervised neural networks for pulse shape discrimi...Combined supervised and unsupervised neural networks for pulse shape discrimi...
Combined supervised and unsupervised neural networks for pulse shape discrimi...
 
Data Analytics for Decision Making By District 11 Solutions
Data Analytics for Decision Making By District 11 SolutionsData Analytics for Decision Making By District 11 Solutions
Data Analytics for Decision Making By District 11 Solutions
 
Unit 1 Introduction to DATA SCIENCE .pptx
Unit 1 Introduction to DATA SCIENCE .pptxUnit 1 Introduction to DATA SCIENCE .pptx
Unit 1 Introduction to DATA SCIENCE .pptx
 
Big Data and Analytics Shaping the future of Payments
Big Data and Analytics Shaping the future of PaymentsBig Data and Analytics Shaping the future of Payments
Big Data and Analytics Shaping the future of Payments
 
SFBA Splunk Usergroup meeting July 17, 2024
SFBA Splunk Usergroup meeting July 17, 2024SFBA Splunk Usergroup meeting July 17, 2024
SFBA Splunk Usergroup meeting July 17, 2024
 
393947940-The-Dell-EMC-PowerMax-Family-Overview.pdf
393947940-The-Dell-EMC-PowerMax-Family-Overview.pdf393947940-The-Dell-EMC-PowerMax-Family-Overview.pdf
393947940-The-Dell-EMC-PowerMax-Family-Overview.pdf
 
Cal Girls Hotel Safari Jaipur | | Girls Call Free Drop Service
Cal Girls Hotel Safari Jaipur | | Girls Call Free Drop ServiceCal Girls Hotel Safari Jaipur | | Girls Call Free Drop Service
Cal Girls Hotel Safari Jaipur | | Girls Call Free Drop Service
 
CT AnGIOGRAPHY of pulmonary embolism.pptx
CT AnGIOGRAPHY of pulmonary embolism.pptxCT AnGIOGRAPHY of pulmonary embolism.pptx
CT AnGIOGRAPHY of pulmonary embolism.pptx
 
Vrinda store data analysis project using Excel
Vrinda store data analysis project using ExcelVrinda store data analysis project using Excel
Vrinda store data analysis project using Excel
 
Histology of Muscle types histology o.ppt
Histology of Muscle types histology o.pptHistology of Muscle types histology o.ppt
Histology of Muscle types histology o.ppt
 

Calculated Columns and Measures in Power BI.pptx

  • 1. Power BI Tips and Timesavers Calculated Columns And Measures in Power BI
  • 2. A guide to understanding the differences between calculated columns and measures in DAX for Power BI
  • 3. What is a calculated column? A calculated column is a static value added to a table, calculated row by row when you load the data. What is a measure? A measure is a dynamic value that changes based on what you’re looking at in a report, calculated dynamically within the filter context of a visual
  • 4. We will use a Gross Profit Example We start by loading some sample sales data
  • 5. How to create a calculated column The first thing we will do is to calculate the Gross Profit for each row in this table In the table view, select New Column from the Ribbon
  • 6. How to create a calculated column In the formula bar we type Gross Profit = [Sales Value]-[Cost of Sales] This adds a new column, which calculates the gross profit by subtracting the cost of sales from the sales value When we press enter the column is added to the table, and it is calculated for each row of data in that table We also create a Gross Profit Margin calculated column
  • 7. Benefits & Limitations Benefits of Calculated Columns in Power BI One of the most obvious benefits of creating a calculated column in a table is that is easily visible and can be quickly understood. It is calculated once the data refreshes and is not affected by any other filters, effectively it is a static column. This means that it can be used as a filter. In our example we could use a slicer to only show products that have a margin lower than 60% Limitations of Calculated Columns in Power BI Potentially the biggest draw back of calculated columns is that they must be calculated in full before the data table can be used. This is usually not a problem if the data tables are small, but if you import a very large data table, then have complex calculations running down a number of columns you will see a performance impact. In that case it is often better to perform the calculation further back in the data transformation
  • 8. How to create a measure We want to create a measure that can calculate the overall gross profit margin, even if the report is filtered To create the measure, go to the Table View, and click New Measure on the ribbon Then copy and paste this DAX code Gross Profit Margin (Measure) = sum(Sheet1[Gross Profit]) / sum(Sheet1[Sales Value]) When you press enter, the measure is created. But unlike the calculated column, it does not appear in the table view
  • 9. Benefits of Measures in Power BI Measures are only calculated where used and are only calculated in the context of the face value of the report, this way they respond to filters and slicers Limitations of Measures in Power BI Measures can be more difficult to debug as they are more difficult to understand than a calculated column. But it can be made simpler to understand by creating separate measures for elements of a complex calculation. For example in this example we could create a measure for the sum of gross profit (the numerator) and check that. And we could also create a measure for the sum of the Sales (the denominator) and check that. Out gross profit measure could then just be the Numerator / the Denominator allowing us to debug the components separately
  • 10. On the report view, drag a table to the canvas Then add product, Sales Value, Cost of Sales and the calculated column for Gross Profit to the table But, if we add the Gross profit percentage that we created as a calculated column to the table we get a problem, the default summarisation options cannot calculate the true gross profit Using calculated columns and measures in reports
  • 11. Although this initially looks correct, especially at the product row level, but the grand total is not correct The correct answer should be 1290 divided by 2110, which equals 61.14% The measure correctly calculates the Gross Profit percentage on the overall values and all rows in the report Use the measure to show the gross profit margin
  • 12. We can use the calculated column values to filter the data for rows with a lower margin Please note you cannot use a measure value in a slicer because you need to see the individual rows Use the Calculated Column values if you need to filter
  • 13. We have explained the key differences between calculated columns and measures in Power BI, With examples of why you will need to use both and some of the common errors that we see
  • 14. For more Tips, Tricks and Timesavers, visit our website Business Analytics Blog – Select Distinct Credit: simon.harrison@selectdistinct.co.uk