Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Compare selected Client with TOP N Clients excluding the selected Client based on Volume

I am new to Power BI. I have a requirement to compare selected client with TOP N clients based on volume excluding the selected client. The Client Slicer (dropdown slicer) is where the client is selected to compare with the Top N clients. For example, the image below: 

timmyeal_0-1613597240397.png

If I selected Client E on my Client Slicer and comparing E with Top 3, then I want to achieve report below:

timmyeal_1-1613597588557.png

However, if I selected Client E to compare with Top 4, my result should look like

timmyeal_2-1613597854388.png

Note that since i selected E, it will be excluded from the Top N returns.

 

I will appreciate any help.

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous Thanks for you reaching out, solution is attached, you can tweak it as per your need.

 

rank and compare selected client.gif

 

Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@Anonymous Glad, it worked out, I'm going to write a blog post on this and share it with the community. I like these kinds of scenarios and love sharing with others so that they can learn from it. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Anonymous Thanks for you reaching out, solution is attached, you can tweak it as per your need.

 

rank and compare selected client.gif

 

Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Thanks for solution. However, I want to ask that when the visual is Matrix the Selected Client won't appear at the top. How can I go about the selected client appearing at the top when using Matrix visual?

Anonymous
Not applicable

Thanks parry2k. I thought it is not possible but i thought wrong. This is awesome.

amitchandak
Super User
Super User

@Anonymous ,  Prefer to create a client table disconnected

A new measure for volume

Vol= calculate(sum(Table[volumne]), filter(Table, not Table[Client] in values(client[client])))

 

Try TOP N like, Use a what-if to change 10

Top N Rank = CALCULATE([Vol],TOPN(10,allselected(Table[Client]),[Vol],DESC),VALUES(Table[Client]))


Top N Rank = CALCULATE([Vol],TOPN(10,filter(allselected(Table[Client]), not Table[Client] in values(client[client])),[Vol],DESC),VALUES(Table[Client]))

 

Refer
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

@amitchandak Thanks for you reply. However, I have tried to use your Dax but it is not working. Please can you elaborate more with pbix if possible. Thanks

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.