March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
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.
@dsmitha , 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 ) )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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
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 ) )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi Jihwan_Kim,
Thank you very much for your guidance, this helped a lot
regards,
dsmitha
@dsmitha , 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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
86 | |
76 | |
57 | |
52 |
User | Count |
---|---|
201 | |
137 | |
108 | |
73 | |
68 |