SlideShare a Scribd company logo
Power BI Tips
and Timesavers
TOPN measure in Power
BI
You have heard of the 80:20 rule (Pareto)?
This principle suggests that typically 80% of value comes from the top
20% of your data
In Power BI we can focus the attention of readers on the most significant
pieces of data that drive almost all of the value, using the TOPN function
Top 5 in a Measure
Although Power BI has
a built-in Top N filter
feature
It is often useful to be
able to show that value
as a measure and what
percent of the whole it
represents
This guide shows you
how to do it
Step by Step
Create a measure to
aggregate sales for the
top 5 products
We create a Variable to
identify the top 5
products, and a
separate variable to
aggregate the sales
amount
This makes the DAX
easier to follow
Top 5 Products Sales =
VAR TopNProducts =
TOPN (
5,
SUMMARIZE(Sales,
'Product'[Product],"SALESVALUE",sum(Sales[Sales Amount])),
[SALESVALUE],desc
)
VAR Result =
CALCULATE (
SUM(Sales[Sales Amount]),
TopNProducts
)
RETURN Result
DAX Breakdown
SUMMARIZE creates subtotals, in this case a column with each ‘Product’
and a second column for the total sales
SUMMARIZE(Sales, 'Product'[Product],"SALESVALUE",sum(Sales[Sales
Amount]))
TOPN – The ‘5’ sets how many top rows to return
We use the summarise row to define the data rows (see above)
The last row defines the field to sort by (SALESVALUE in Descending order)
TOPN (
5,
SUMMARIZE(Sales, 'Product'[Product],"SALESVALUE",sum(Sales[Sales
Amount])),
[SALESVALUE],desc
DAX Breakdown
Next we calculate the Sum of Sales for each Product in the Top N products
VAR Result =
CALCULATE (
SUM(Sales[Sales Amount]),
TopNProducts
)
Top X in a Measure
We have then used this
measure on a card to
highlight how much of the
total the top X products
represent
We added a simple
secondary measure showing
what percentage this is
We then created similar for
the bottom 20 products
And Finally added these to
the chart
Having the ability to focus on the top few drivers of performance the TOPN
function is a powerful way to eliminate noise from insignificant items
TOPN in Power BI is easy to learn and apply once you understand the syntax
Keep an eye out for the more advanced use of this with an amendable
parameter in the coming weeks
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 Power BI Tips Top N Measures.pptx

ggg
 ggg ggg
ggg
salehe123
 
Data analytics intelligence dashboard
Data analytics intelligence dashboardData analytics intelligence dashboard
Data analytics intelligence dashboard
VitalStatistics
 
Top N and bottom N view on the same worksheet In Tableau
Top N and bottom N view on the same worksheet In TableauTop N and bottom N view on the same worksheet In Tableau
Top N and bottom N view on the same worksheet In Tableau
Ranganna Naik
 
Marginal costing
Marginal costingMarginal costing
Marginal costing
omkarbhujbal6
 
Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020
Adhi Wikantyoso
 
SAP Foundations and Navigation
SAP Foundations and Navigation SAP Foundations and Navigation
SAP Foundations and Navigation
K Singh
 
Project report aditi paul1
Project report aditi paul1Project report aditi paul1
Project report aditi paul1
guest9529cb
 
Infinite BI
Infinite BIInfinite BI
Infinite BI
Wirabumi Software
 
Operating Leverage.pdf
Operating Leverage.pdfOperating Leverage.pdf
Operating Leverage.pdf
Shreya292338
 
Operating Leverage.pdf
Operating Leverage.pdfOperating Leverage.pdf
Operating Leverage.pdf
Shreya292338
 
Building a semantic/metrics layer using Calcite
Building a semantic/metrics layer using CalciteBuilding a semantic/metrics layer using Calcite
Building a semantic/metrics layer using Calcite
Julian Hyde
 
Company segmentation - an approach with R
Company segmentation - an approach with RCompany segmentation - an approach with R
Company segmentation - an approach with R
Casper Crause
 
Dwh training 1
Dwh training 1Dwh training 1
Dwh training 1
Saugata Sarkar
 
Sales Analysis Power BI Dashboard
Sales Analysis Power BI DashboardSales Analysis Power BI Dashboard
Sales Analysis Power BI Dashboard
Ilgar Zarbaliyev
 
02 Essbase
02 Essbase02 Essbase
02 Essbase
Amit Sharma
 
Devry bis-155-final-exam-guide-new
Devry bis-155-final-exam-guide-newDevry bis-155-final-exam-guide-new
Devry bis-155-final-exam-guide-new
shyaminfo104
 
CVP analyses
CVP analysesCVP analyses
CVP analyses
khanzazaikhan
 
Break even analysis
Break  even analysisBreak  even analysis
Break even analysis
Vc1980
 
Automotive Case UPDATE.pptx
Automotive Case UPDATE.pptxAutomotive Case UPDATE.pptx
Automotive Case UPDATE.pptx
TradeInsight
 
Break Even Analysis
Break Even AnalysisBreak Even Analysis
Break Even Analysis
Nikhil Das
 

Similar to Power BI Tips Top N Measures.pptx (20)

ggg
 ggg ggg
ggg
 
Data analytics intelligence dashboard
Data analytics intelligence dashboardData analytics intelligence dashboard
Data analytics intelligence dashboard
 
Top N and bottom N view on the same worksheet In Tableau
Top N and bottom N view on the same worksheet In TableauTop N and bottom N view on the same worksheet In Tableau
Top N and bottom N view on the same worksheet In Tableau
 
Marginal costing
Marginal costingMarginal costing
Marginal costing
 
Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020Easy Pivot Tutorial June 2020
Easy Pivot Tutorial June 2020
 
SAP Foundations and Navigation
SAP Foundations and Navigation SAP Foundations and Navigation
SAP Foundations and Navigation
 
Project report aditi paul1
Project report aditi paul1Project report aditi paul1
Project report aditi paul1
 
Infinite BI
Infinite BIInfinite BI
Infinite BI
 
Operating Leverage.pdf
Operating Leverage.pdfOperating Leverage.pdf
Operating Leverage.pdf
 
Operating Leverage.pdf
Operating Leverage.pdfOperating Leverage.pdf
Operating Leverage.pdf
 
Building a semantic/metrics layer using Calcite
Building a semantic/metrics layer using CalciteBuilding a semantic/metrics layer using Calcite
Building a semantic/metrics layer using Calcite
 
Company segmentation - an approach with R
Company segmentation - an approach with RCompany segmentation - an approach with R
Company segmentation - an approach with R
 
Dwh training 1
Dwh training 1Dwh training 1
Dwh training 1
 
Sales Analysis Power BI Dashboard
Sales Analysis Power BI DashboardSales Analysis Power BI Dashboard
Sales Analysis Power BI Dashboard
 
02 Essbase
02 Essbase02 Essbase
02 Essbase
 
Devry bis-155-final-exam-guide-new
Devry bis-155-final-exam-guide-newDevry bis-155-final-exam-guide-new
Devry bis-155-final-exam-guide-new
 
CVP analyses
CVP analysesCVP analyses
CVP analyses
 
Break even analysis
Break  even analysisBreak  even analysis
Break even analysis
 
Automotive Case UPDATE.pptx
Automotive Case UPDATE.pptxAutomotive Case UPDATE.pptx
Automotive Case UPDATE.pptx
 
Break Even Analysis
Break Even AnalysisBreak Even Analysis
Break Even Analysis
 

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

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
 
Field Diary and lab record, Importance.pdf
Field Diary and lab record, Importance.pdfField Diary and lab record, Importance.pdf
Field Diary and lab record, Importance.pdf
hritikbui
 
DESIGN AND DEVELOPMENT OF AUTO OXYGEN CONCENTRATOR WITH SOS ALERT FOR HIKING ...
DESIGN AND DEVELOPMENT OF AUTO OXYGEN CONCENTRATOR WITH SOS ALERT FOR HIKING ...DESIGN AND DEVELOPMENT OF AUTO OXYGEN CONCENTRATOR WITH SOS ALERT FOR HIKING ...
DESIGN AND DEVELOPMENT OF AUTO OXYGEN CONCENTRATOR WITH SOS ALERT FOR HIKING ...
JeevanKp7
 
Full Disclosure Board Policy.docx BRGY LICUMA
Full  Disclosure Board Policy.docx BRGY LICUMAFull  Disclosure Board Policy.docx BRGY LICUMA
Full Disclosure Board Policy.docx BRGY LICUMA
brgylicumaormoccity
 
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
rightmanforbloodline
 
Data Storytelling Final Project for MBA 635
Data Storytelling Final Project for MBA 635Data Storytelling Final Project for MBA 635
Data Storytelling Final Project for MBA 635
HeidiLivengood
 
Audits Of Complaints Against the PPD Report_2022.pdf
Audits Of Complaints Against the PPD Report_2022.pdfAudits Of Complaints Against the PPD Report_2022.pdf
Audits Of Complaints Against the PPD Report_2022.pdf
evwcarr
 
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
 
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
 
Systane Global education training centre
Systane Global education training centreSystane Global education training centre
Systane Global education training centre
AkhinaRomdoni
 
PRODUCT | RESEARCH-PRESENTATION-1.1.pptx
PRODUCT | RESEARCH-PRESENTATION-1.1.pptxPRODUCT | RESEARCH-PRESENTATION-1.1.pptx
PRODUCT | RESEARCH-PRESENTATION-1.1.pptx
amazenolmedojeruel
 
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
 
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
 
Aws MLOps Interview Questions with answers
Aws MLOps Interview Questions  with answersAws MLOps Interview Questions  with answers
Aws MLOps Interview Questions with answers
Sathiakumar Chandr
 
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
 
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
 
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
 
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
 
CT AnGIOGRAPHY of pulmonary embolism.pptx
CT AnGIOGRAPHY of pulmonary embolism.pptxCT AnGIOGRAPHY of pulmonary embolism.pptx
CT AnGIOGRAPHY of pulmonary embolism.pptx
RejoJohn2
 
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
 

Recently uploaded (20)

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
 
Field Diary and lab record, Importance.pdf
Field Diary and lab record, Importance.pdfField Diary and lab record, Importance.pdf
Field Diary and lab record, Importance.pdf
 
DESIGN AND DEVELOPMENT OF AUTO OXYGEN CONCENTRATOR WITH SOS ALERT FOR HIKING ...
DESIGN AND DEVELOPMENT OF AUTO OXYGEN CONCENTRATOR WITH SOS ALERT FOR HIKING ...DESIGN AND DEVELOPMENT OF AUTO OXYGEN CONCENTRATOR WITH SOS ALERT FOR HIKING ...
DESIGN AND DEVELOPMENT OF AUTO OXYGEN CONCENTRATOR WITH SOS ALERT FOR HIKING ...
 
Full Disclosure Board Policy.docx BRGY LICUMA
Full  Disclosure Board Policy.docx BRGY LICUMAFull  Disclosure Board Policy.docx BRGY LICUMA
Full Disclosure Board Policy.docx BRGY LICUMA
 
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
Solution Manual for First Course in Abstract Algebra A, 8th Edition by John B...
 
Data Storytelling Final Project for MBA 635
Data Storytelling Final Project for MBA 635Data Storytelling Final Project for MBA 635
Data Storytelling Final Project for MBA 635
 
Audits Of Complaints Against the PPD Report_2022.pdf
Audits Of Complaints Against the PPD Report_2022.pdfAudits Of Complaints Against the PPD Report_2022.pdf
Audits Of Complaints Against the PPD Report_2022.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
 
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...
 
Systane Global education training centre
Systane Global education training centreSystane Global education training centre
Systane Global education training centre
 
PRODUCT | RESEARCH-PRESENTATION-1.1.pptx
PRODUCT | RESEARCH-PRESENTATION-1.1.pptxPRODUCT | RESEARCH-PRESENTATION-1.1.pptx
PRODUCT | RESEARCH-PRESENTATION-1.1.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
 
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
 
Aws MLOps Interview Questions with answers
Aws MLOps Interview Questions  with answersAws MLOps Interview Questions  with answers
Aws MLOps Interview Questions with answers
 
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...
 
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
 
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
 
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
 
CT AnGIOGRAPHY of pulmonary embolism.pptx
CT AnGIOGRAPHY of pulmonary embolism.pptxCT AnGIOGRAPHY of pulmonary embolism.pptx
CT AnGIOGRAPHY of pulmonary embolism.pptx
 
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
 

Power BI Tips Top N Measures.pptx

  • 1. Power BI Tips and Timesavers TOPN measure in Power BI
  • 2. You have heard of the 80:20 rule (Pareto)? This principle suggests that typically 80% of value comes from the top 20% of your data In Power BI we can focus the attention of readers on the most significant pieces of data that drive almost all of the value, using the TOPN function
  • 3. Top 5 in a Measure Although Power BI has a built-in Top N filter feature It is often useful to be able to show that value as a measure and what percent of the whole it represents This guide shows you how to do it
  • 4. Step by Step Create a measure to aggregate sales for the top 5 products We create a Variable to identify the top 5 products, and a separate variable to aggregate the sales amount This makes the DAX easier to follow Top 5 Products Sales = VAR TopNProducts = TOPN ( 5, SUMMARIZE(Sales, 'Product'[Product],"SALESVALUE",sum(Sales[Sales Amount])), [SALESVALUE],desc ) VAR Result = CALCULATE ( SUM(Sales[Sales Amount]), TopNProducts ) RETURN Result
  • 5. DAX Breakdown SUMMARIZE creates subtotals, in this case a column with each ‘Product’ and a second column for the total sales SUMMARIZE(Sales, 'Product'[Product],"SALESVALUE",sum(Sales[Sales Amount])) TOPN – The ‘5’ sets how many top rows to return We use the summarise row to define the data rows (see above) The last row defines the field to sort by (SALESVALUE in Descending order) TOPN ( 5, SUMMARIZE(Sales, 'Product'[Product],"SALESVALUE",sum(Sales[Sales Amount])), [SALESVALUE],desc
  • 6. DAX Breakdown Next we calculate the Sum of Sales for each Product in the Top N products VAR Result = CALCULATE ( SUM(Sales[Sales Amount]), TopNProducts )
  • 7. Top X in a Measure We have then used this measure on a card to highlight how much of the total the top X products represent We added a simple secondary measure showing what percentage this is We then created similar for the bottom 20 products And Finally added these to the chart
  • 8. Having the ability to focus on the top few drivers of performance the TOPN function is a powerful way to eliminate noise from insignificant items TOPN in Power BI is easy to learn and apply once you understand the syntax Keep an eye out for the more advanced use of this with an amendable parameter in the coming weeks
  • 9. For more Tips, Tricks and Timesavers, visit our website Business Analytics Blog – Select Distinct Credit: simon.harrison@selectdistinct.co.uk