Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Everyone,
I want to do some charting utilising a dynamic Top N approach. After much work I have it working in general but I am hoping I can tweak it further.
Here is some sample data/visuals:
The left table correctly shows the Top 6 Trade Partners and rolls the rest up into an "Others" category.
However when I want to chart or display these Trade Partners, by adding in the Year context, the measure now shows the Top 6 per year. Meaning the left table now has NO values for "Viet Nam" and "Thailand" in 2020 despite them being in the Top 6 overall for the 3 selected Years. You can see that "Japan" and "Malaysia" are NOT in the top 6 overall, but are in the Top 6 for 2020 only.
Is there a way to filter second yearly table by the Trade Partners displayed in the first table? I would like to plot or show values for all years for "Viet Nam" and "Thailand" as currently their 2020 values are being rolled up into "Others" which is confusing. It looks even worse when you plot on a chart.
Also this is the tutorial I was roughly following.
Display Top N items and Others in Power BI - Goodly
You can see that they use the yearly slicer, but only ever select a single year. So the chart is always correct.
My current measure is:
Thanks for taking the time to respond. I appreciate it.
I know you could do something like this in SQL with a sub select... trying to think how to do it in Power BI. I think it should be possible to get say the top 5 countires for overall sales (for the selected years), then show me all the individual sales for those countries for all years. I will keep thinking.
Your requirements are conflicting with each other. You need to decide if you only want to go by the combined years filter context or if you want to consider the in-year ranking. You can't have both.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
117 | |
84 | |
49 | |
38 | |
28 |
User | Count |
---|---|
188 | |
76 | |
73 | |
54 | |
42 |