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.
Hello,
i'm facing a problem with a report of quantities sales.
I have 2 levels of row like this
- Nation 1
- Customer 1
- Customer 2
- Customer N
- Nation N
And i need to group only the customer displaying all the nations. So the only level that have to change is customer to show the report (matrix) like this:
- Nation 1
- Customer 1
- Customer 2
- Customer 3
- Customer 4
- Customer 5
- Other
- Nation 2
- Customer 1
- Customer 2
- Customer 3
- Customer 4
- Customer 5
- Other
- Nation N
- Customer 1
- Customer 2
- Customer 3
- Customer 4
- Customer 5
- Other
I want to display automatically only the top 5 customer per sales and the others in a generic "Other" section. If i use the group function I have to do that manually but that's painfully long with lots of customers for different nations.
How can I solve this problem?
Thanks in advance
Solved! Go to Solution.
Hi @Filippomonti ,
Since there is no sample data provided in the question so I can't write the code directly.However,you can refer below article for getting TopN based on the nation. It helped me and I hope it will help you as well.
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Filippomonti ,
Since there is no sample data provided in the question so I can't write the code directly.However,you can refer below article for getting TopN based on the nation. It helped me and I hope it will help you as well.
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Samarth_18 ,
Thank you very much for the support, I watched the video and it solved my problem.
Now, is there a way to alway display the "Others" row? I need to filter the matrix so i don't see rows with Sales Amount (as the video) = 0 but i need to see always Other.
Thank you in advance, best regards
Filippo
Is it possible for you to share your PBIX after removing confidential data?
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
I figured out how to do that and unfortunately I can't share my pbix. Anyway, thank you for your kind help!
Have a nice day 🙂
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 |
---|---|
106 | |
105 | |
79 | |
69 | |
62 |
User | Count |
---|---|
142 | |
105 | |
103 | |
85 | |
70 |