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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

dax for top 5

Hi

i am looking for dax to display top 5 place names based on request. i dont want to use top n filter bcoz it will not consider the reappearing requests.

greeshma_0-1622144287296.png
expected top 5

Nenagh      19
Donegal      15
carlow         13
enniscorthy 13
ballyowen   12

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

To your visual drag Store and this measure

Top 5 stores = calculate([request],TOPN(5,ALL(Data[Store]),[request]),values(Data[Store]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
ManojRajendran
Frequent Visitor

I got a scenario where I need to show top 5 category sales in one visual and in another visual I need to show other categories which are not in top 5 of the previous visual. Please suggest.

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
suparnababu7
Regular Visitor

Thanks.It Worked

 

Ashish_Mathur
Super User
Super User

Hi,

To your visual drag Store and this measure

Top 5 stores = calculate([request],TOPN(5,ALL(Data[Store]),[request]),values(Data[Store]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.