Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I'm trying to create a custom tooltip but I got a little stuck, the following link leads to the sample dashboard: https://drive.google.com/file/d/1Orw9lL_6VzcnV6CQj1-L1gHWaCLbER11/view?usp=share_link.
Because for some reason I can't attach a file (yet) with my new account.
The dashboard is only a slightly modified version of this blog: https://www.oraylis.de/blog/2016/show-top-n-and-rest-in-power-bi.
What I am trying to do is the following:
I have a barchart of sales per product category and I want my tooltip to show the top 10 sales on item level and classifying the rest as other, so the totals will match up with value in the barchart. I managed to create measures for topN and other. But I couldn't make this work in a tooltip as described.
Thanks a lot,
Solved! Go to Solution.
Hi, I ended op solving it through a solution found here: https://community.powerbi.com/t5/Desktop/Show-Top-N-and-sum-up-the-Others-as-a-value/m-p/313004?ligh...
@ae1999 , Create a tooltip page with item and TOPN measure (using sales measure )
example
CALCULATE([Sales],TOPN(10 ,all(Item[Item]),[Sales],DESC),VALUES(Item[Item])))
TOPN: https://youtu.be/QIVEFp-QiOk
Power BI Tooltip Page: How to pass selective values to the tooltip page: https://www.youtube.com/watch?v=lEq7YtkxeLU
Dear @amitchandak,
Thank you for your quick reply. I tried to make a measure as you suggested and this seems to work to get the top 10 sales values indeed. But this measure does not classify all remaining sales (outside the top 10) as other. By using the suggested measure I also run into some issues with passing the filters. But that probably happens because of the different data levels (category vs model).
Thanks a lot!
@ae1999 , If you have more than one measure use TOPN in FIlter or use TOPN Measure has filter
or have more measures , like gross based on TOPN of sales
CALCULATE([Gross],TOPN(10 ,all(Item[Item]),[Sales],DESC),VALUES(Item[Item])))
If you need TOP based on two columns
2 column top N = CALCULATE([Net], TOPN(10, SUMMARIZE(ALLSELECTED('Item'), 'Item'[Brand], 'Item'[Category]), [Net],DESC),VALUES('Item'[Brand]), VALUES('Item'[Category]) )
Hi @amitchandak,
Thanks again for your help. This works perfectly to filter the top 10 indeed. But this does not classify the remaining part as "other". In which case the totals wouldn't add up. I hope that clarifies it a bit more, let me know if something is unclear!
Thanks a lot,
Hi, I ended op solving it through a solution found here: https://community.powerbi.com/t5/Desktop/Show-Top-N-and-sum-up-the-Others-as-a-value/m-p/313004?ligh...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
105 | |
88 | |
74 | |
66 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |