Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
Am trying to develop a dashboard which will show the top five sales and bottom five sales detais using a column chart visual.
I would like to add a measure instead of the filter options. Request your guidance to solve this issue
regards,
dsmitha
Solved! Go to Solution.
@Anonymous , You can measures like ([Sales] is a measure)
TOP 5= Divide( CALCULATE([Sales],TOPN(5,all(Geography[City]),[Sales],DESC),VALUES(Geography[City]))
Botton 5 = Divide( CALCULATE([Sales],TOPN(5,all(Geography[City]),[Sales],DESC),VALUES(Geography[City]))
Combine = Divide( CALCULATE([Sales],TOPN(5,all(Geography[City]),[Sales],DESC),VALUES(Geography[City])) +
Divide( CALCULATE([Sales],TOPN(5,all(Geography[City]),[Sales],DESC),VALUES(Geography[City]))
Refer: https://youtu.be/QIVEFp-QiOk
Hi,
I like to suggest using TOPN DAX function with KEEPFILTERS DAX function.
I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Sales measure: =
SUM( Data[Sales] )
Top five products: =
CALCULATE (
[Sales measure:],
KEEPFILTERS ( TOPN ( 5, ALL ( Data ), [Sales measure:], DESC ) )
)
Bottom five products: =
CALCULATE (
[Sales measure:],
KEEPFILTERS ( TOPN ( 5, ALL ( Data ), [Sales measure:], ASC ) )
)
@Anonymous
Using RANKX > Top and Bottom 10 Products by Sales Using RANKX in Power BI - YouTube
Using the Same Visual > Solved: How to display Top 5 and Bottom 5 in the single ch... - Microsoft Power BI Community
Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users
@Anonymous
Using RANKX > Top and Bottom 10 Products by Sales Using RANKX in Power BI - YouTube
Using the Same Visual > Solved: How to display Top 5 and Bottom 5 in the single ch... - Microsoft Power BI Community
Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users
Hi,
I like to suggest using TOPN DAX function with KEEPFILTERS DAX function.
I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Sales measure: =
SUM( Data[Sales] )
Top five products: =
CALCULATE (
[Sales measure:],
KEEPFILTERS ( TOPN ( 5, ALL ( Data ), [Sales measure:], DESC ) )
)
Bottom five products: =
CALCULATE (
[Sales measure:],
KEEPFILTERS ( TOPN ( 5, ALL ( Data ), [Sales measure:], ASC ) )
)
Hi Jihwan_Kim,
Thank you very much for your guidance, this helped a lot
regards,
dsmitha
@Anonymous , You can measures like ([Sales] is a measure)
TOP 5= Divide( CALCULATE([Sales],TOPN(5,all(Geography[City]),[Sales],DESC),VALUES(Geography[City]))
Botton 5 = Divide( CALCULATE([Sales],TOPN(5,all(Geography[City]),[Sales],DESC),VALUES(Geography[City]))
Combine = Divide( CALCULATE([Sales],TOPN(5,all(Geography[City]),[Sales],DESC),VALUES(Geography[City])) +
Divide( CALCULATE([Sales],TOPN(5,all(Geography[City]),[Sales],DESC),VALUES(Geography[City]))
Refer: https://youtu.be/QIVEFp-QiOk
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
70 | |
68 | |
43 | |
34 | |
26 |
User | Count |
---|---|
86 | |
49 | |
45 | |
38 | |
37 |