Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
87 | |
82 | |
71 | |
49 |
User | Count |
---|---|
143 | |
123 | |
107 | |
61 | |
55 |