SlideShare a Scribd company logo
1 of 16
Power BI Tips
and Timesavers
Advanced TOP N in
Power BI
We showed how the standard filters in Power BI could be used to filter
the top or bottom rows
But, what if you also need to show the ‘others’ at the same time
This is a little more in depth, this guide shows you how
Advanced Top N
If you use the standard
TOP 5 filter, you ONLY
see the top 5
We will show you how
to add a slicer to select
which top rows to see
And also how to show
the balance as an
‘Others’ row
Step 1
Ensure there is a
measure value for the
ranking
You may have a
measure already, but if
not create one
DAX Code
Gross Sales New =
SUM(Financials[Gross Sales])
Step 2
Create a new table to determine the values for
‘Other’
Use this DAX code to create the new table
TopN Names =
UNION
(ALLNOBLANKROW( Financials[Country]),
{"Others"}
)
Step 3
Create a parameter to set the number of top
rows to show
ensure the parameter details are set as this
This creates a new parameter table and a slicer at the same time
Step 4
Add a new measure
This applies a ranking to all values in the rows,
including others, based on the measure.
Ranking =
VAR CatToRank = [TopN Value]
VAR Ranking =
RANKX (
ALLSELECTED('TopN Names'[Country]),
[Gross Sales New]
)
VAR IsOtherSelected =
SELECTEDVALUE('TopN Names'[Country]) = "Others"
VAR Result =
IF (
IsOtherSelected,
CatToRank + 1,
IF ( Ranking <= CatToRank , Ranking, ranking + 1)
)
Return
Result
Step 5
Make the rows visible if their rank is within the
Top N results
Create another measure with this code
RowVisible =
VAR Ranking = [Ranking]
VAR TopNValue = 'TopN'[TopN Value]
VAR Result = INT( Ranking <= TopNValue + 1)
Return
Result
Step 6
Compute a value for 'Others'
Gross Sales New Amount =
VAR NewMeasureAll =
CALCULATE( [Gross Sales New], REMOVEFILTERS('TopN Names'[Country]) )
RETURN
IF (
ISINSCOPE('TopN Names'[Country] ),
VAR TopNToRank = [TopN Value]
VAR IsOtherSelected = SELECTEDVALUE('TopN Names'[Country]) = "Others"
VAR TopNWithMeasure =
ADDCOLUMNS(
ALLSELECTED('TopN Names'[Country]),
"@amt" , [Gross Sales New]
)
VAR TopNCat = TOPN( TopNToRank, TopNWithMeasure, [@amt] )
VAR TotalTopN = SUMX( TopNCat,[@amt] )
VAR Result = IF ( IsOtherSelected, NewMeasureAll - TotalTopN , [Gross Sales New])
RETURN Result ,
NewMeasureAll
)
This creates a new measure which is used in place of the original. This is necessary as the total of “Other” results has to be recalculated when the
TopN value changes.
Create the relationship to the Top N
Enable “Other” values by Joining TopN
Names table to the Financials table.
Open the Model window using the
bottom icon in the left menu
Create a connection (Join) between the two Country objects
Filter to show Top N and Other
As it stands the Matrix is showing the original values, and all values.
The Row Visible measure can be used to filter as only TopN and
Other
Ensure the Matrix is selected.
Drag Row Visible item from Fields Pane to the Add Data field in the
Filter Pane
Change the Show Items drop down to ‘IS’
Add ‘1’ to the value box
Click Apply Filter
Include the new values in the matrix
Swap Gross Sales New
measure for the Gross Sales
New Amount in the
Visualisations Pane, Values
box
This changes the values in
the Matrix. Note ‘Other’ is
now shown.
By default this is sorting the values by country ascending, we want the
values to sort descending, but with the 'others' to always be last
We add the 'Ranking' measure into the matrix
Order the Ranking values Ascending. Click on the column header in the
matrix until the Arrow points up and the ranking is from 1 upwards.
Use in other visuals
Change the visual type to Pie
Chart.
This example clearly shows
the top 5 as representing
around a quarter of the
whole, with 'Others' showing
the majority
In this case we do not need
Ranking, it can be removed
See it in action
Users can use the slicer to alter the level of detail they need to see
This is a little more complicated than the normal Top N filter, but the
overall effect is worth the effort
Having the option to select the Top N value using a slicer in Power BI is a
great way to allow the user to interact with the data
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 Advanced Top N Measures in Power BI

Lesson 18 Creating Pivot Tables
Lesson 18 Creating Pivot TablesLesson 18 Creating Pivot Tables
Lesson 18 Creating Pivot Tables
guevarra_2000
 
4b6c1c5c-e913-4bbf-b3a4-41e23cb961ba-161004200047.pdf
4b6c1c5c-e913-4bbf-b3a4-41e23cb961ba-161004200047.pdf4b6c1c5c-e913-4bbf-b3a4-41e23cb961ba-161004200047.pdf
4b6c1c5c-e913-4bbf-b3a4-41e23cb961ba-161004200047.pdf
Nitish Nagar
 
Commonly used excel formulas
Commonly used excel formulasCommonly used excel formulas
Commonly used excel formulas
saladi330
 

Similar to Advanced Top N Measures in Power BI (20)

Exp2003 exl ppt_04
Exp2003 exl ppt_04Exp2003 exl ppt_04
Exp2003 exl ppt_04
 
6 Excel Essentials for Digital Marketers
6 Excel Essentials for Digital Marketers6 Excel Essentials for Digital Marketers
6 Excel Essentials for Digital Marketers
 
3 Excel Tools That Help You Perform a What-If Analysis
3 Excel Tools That Help You Perform a What-If Analysis3 Excel Tools That Help You Perform a What-If Analysis
3 Excel Tools That Help You Perform a What-If Analysis
 
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
 
4b6c1c5c-e913-4bbf-b3a4-41e23cb961ba-161004200047.pdf
4b6c1c5c-e913-4bbf-b3a4-41e23cb961ba-161004200047.pdf4b6c1c5c-e913-4bbf-b3a4-41e23cb961ba-161004200047.pdf
4b6c1c5c-e913-4bbf-b3a4-41e23cb961ba-161004200047.pdf
 
I Simply Excel
I Simply ExcelI Simply Excel
I Simply Excel
 
Advanced Excel ppt
Advanced Excel pptAdvanced Excel ppt
Advanced Excel ppt
 
1a s4 i creating runcharts final
1a s4 i creating runcharts final1a s4 i creating runcharts final
1a s4 i creating runcharts final
 
GC TUG Spring 2024 - Dashboard Actions.pptx
GC TUG Spring 2024 - Dashboard Actions.pptxGC TUG Spring 2024 - Dashboard Actions.pptx
GC TUG Spring 2024 - Dashboard Actions.pptx
 
Day 4 more on formulas and functions
Day 4 more on formulas and functionsDay 4 more on formulas and functions
Day 4 more on formulas and functions
 
Power BI Tips Switch Measures.pptx
Power BI Tips Switch Measures.pptxPower BI Tips Switch Measures.pptx
Power BI Tips Switch Measures.pptx
 
Dax queries.pdf
Dax queries.pdfDax queries.pdf
Dax queries.pdf
 
Microsoft Excel VLOOKUP Function
Microsoft Excel VLOOKUP FunctionMicrosoft Excel VLOOKUP Function
Microsoft Excel VLOOKUP Function
 
Seven Quality Tools.pptx
Seven Quality Tools.pptxSeven Quality Tools.pptx
Seven Quality Tools.pptx
 
Quality_Tools1.ppt
Quality_Tools1.pptQuality_Tools1.ppt
Quality_Tools1.ppt
 
Commonly used excel formulas
Commonly used excel formulasCommonly used excel formulas
Commonly used excel formulas
 
Commonly used excel formulas
Commonly used excel formulasCommonly used excel formulas
Commonly used excel formulas
 
Industry analysis tool 2.0
Industry analysis tool 2.0Industry analysis tool 2.0
Industry analysis tool 2.0
 
Chap 4 c++
Chap 4 c++Chap 4 c++
Chap 4 c++
 

More from Select Distinct Limited

More from Select Distinct Limited (20)

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
 
Custom Formats in Power BI
Custom Formats in Power BICustom Formats in Power BI
Custom Formats in Power BI
 
SQL Tips UNPIVOT Function.pptx
SQL Tips UNPIVOT Function.pptxSQL Tips UNPIVOT Function.pptx
SQL Tips UNPIVOT Function.pptx
 
Power BI Drill Through
Power BI Drill ThroughPower BI Drill Through
Power BI Drill Through
 
How to PIVOT in SQL
How to PIVOT in SQLHow to PIVOT in SQL
How to PIVOT in SQL
 

Recently uploaded

原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
pwgnohujw
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Bertram Ludäscher
 
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
acoha1
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444
saurabvyas476
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...Huawei Ransomware Protection Storage Solution Technical Overview Presentation...
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...
LuisMiguelPaz5
 
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
zifhagzkk
 
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
acoha1
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
jk0tkvfv
 

Recently uploaded (20)

Seven tools of quality control.slideshare
Seven tools of quality control.slideshareSeven tools of quality control.slideshare
Seven tools of quality control.slideshare
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
 
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
Jual Obat Aborsi Bandung (Asli No.1) Wa 082134680322 Klinik Obat Penggugur Ka...
 
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarjSCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
 
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(WashU毕业证书)圣路易斯华盛顿大学毕业证成绩单本科硕士学位证留信学历认证
 
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTSDBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
DBMS UNIT 5 46 CONTAINS NOTES FOR THE STUDENTS
 
DS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .pptDS Lecture-1 about discrete structure .ppt
DS Lecture-1 about discrete structure .ppt
 
社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
 
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...Huawei Ransomware Protection Storage Solution Technical Overview Presentation...
Huawei Ransomware Protection Storage Solution Technical Overview Presentation...
 
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
如何办理(Dalhousie毕业证书)达尔豪斯大学毕业证成绩单留信学历认证
 
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UPenn毕业证书)宾夕法尼亚大学毕业证成绩单本科硕士学位证留信学历认证
 
👉 Tirunelveli Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Gir...
👉 Tirunelveli Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Gir...👉 Tirunelveli Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Gir...
👉 Tirunelveli Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Gir...
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单学位证留信学历认证原件一样
 

Advanced Top N Measures in Power BI

  • 1. Power BI Tips and Timesavers Advanced TOP N in Power BI
  • 2. We showed how the standard filters in Power BI could be used to filter the top or bottom rows But, what if you also need to show the ‘others’ at the same time This is a little more in depth, this guide shows you how
  • 3. Advanced Top N If you use the standard TOP 5 filter, you ONLY see the top 5 We will show you how to add a slicer to select which top rows to see And also how to show the balance as an ‘Others’ row
  • 4. Step 1 Ensure there is a measure value for the ranking You may have a measure already, but if not create one DAX Code Gross Sales New = SUM(Financials[Gross Sales])
  • 5. Step 2 Create a new table to determine the values for ‘Other’ Use this DAX code to create the new table TopN Names = UNION (ALLNOBLANKROW( Financials[Country]), {"Others"} )
  • 6. Step 3 Create a parameter to set the number of top rows to show ensure the parameter details are set as this This creates a new parameter table and a slicer at the same time
  • 7. Step 4 Add a new measure This applies a ranking to all values in the rows, including others, based on the measure. Ranking = VAR CatToRank = [TopN Value] VAR Ranking = RANKX ( ALLSELECTED('TopN Names'[Country]), [Gross Sales New] ) VAR IsOtherSelected = SELECTEDVALUE('TopN Names'[Country]) = "Others" VAR Result = IF ( IsOtherSelected, CatToRank + 1, IF ( Ranking <= CatToRank , Ranking, ranking + 1) ) Return Result
  • 8. Step 5 Make the rows visible if their rank is within the Top N results Create another measure with this code RowVisible = VAR Ranking = [Ranking] VAR TopNValue = 'TopN'[TopN Value] VAR Result = INT( Ranking <= TopNValue + 1) Return Result
  • 9. Step 6 Compute a value for 'Others' Gross Sales New Amount = VAR NewMeasureAll = CALCULATE( [Gross Sales New], REMOVEFILTERS('TopN Names'[Country]) ) RETURN IF ( ISINSCOPE('TopN Names'[Country] ), VAR TopNToRank = [TopN Value] VAR IsOtherSelected = SELECTEDVALUE('TopN Names'[Country]) = "Others" VAR TopNWithMeasure = ADDCOLUMNS( ALLSELECTED('TopN Names'[Country]), "@amt" , [Gross Sales New] ) VAR TopNCat = TOPN( TopNToRank, TopNWithMeasure, [@amt] ) VAR TotalTopN = SUMX( TopNCat,[@amt] ) VAR Result = IF ( IsOtherSelected, NewMeasureAll - TotalTopN , [Gross Sales New]) RETURN Result , NewMeasureAll ) This creates a new measure which is used in place of the original. This is necessary as the total of “Other” results has to be recalculated when the TopN value changes.
  • 10. Create the relationship to the Top N Enable “Other” values by Joining TopN Names table to the Financials table. Open the Model window using the bottom icon in the left menu Create a connection (Join) between the two Country objects
  • 11. Filter to show Top N and Other As it stands the Matrix is showing the original values, and all values. The Row Visible measure can be used to filter as only TopN and Other Ensure the Matrix is selected. Drag Row Visible item from Fields Pane to the Add Data field in the Filter Pane Change the Show Items drop down to ‘IS’ Add ‘1’ to the value box Click Apply Filter
  • 12. Include the new values in the matrix Swap Gross Sales New measure for the Gross Sales New Amount in the Visualisations Pane, Values box This changes the values in the Matrix. Note ‘Other’ is now shown. By default this is sorting the values by country ascending, we want the values to sort descending, but with the 'others' to always be last We add the 'Ranking' measure into the matrix Order the Ranking values Ascending. Click on the column header in the matrix until the Arrow points up and the ranking is from 1 upwards.
  • 13. Use in other visuals Change the visual type to Pie Chart. This example clearly shows the top 5 as representing around a quarter of the whole, with 'Others' showing the majority In this case we do not need Ranking, it can be removed
  • 14. See it in action Users can use the slicer to alter the level of detail they need to see
  • 15. This is a little more complicated than the normal Top N filter, but the overall effect is worth the effort Having the option to select the Top N value using a slicer in Power BI is a great way to allow the user to interact with the data
  • 16. For more Tips, Tricks and Timesavers, visit our website Business Analytics Blog – Select Distinct Credit: simon.harrison@selectdistinct.co.uk