Forum Discussion
Top 10 records (absolute value) in bargraph.
Hi All,
Please suggest how to have top 10 records (absolute value) in bargraph.
Thank you.
Hi Snagalapur
You need to perform the following steps :1) Select your visual
2) In Filter section , go to Filter on this visual section , and In your "Market List " Category
change the Filter Type to TopN , just below in show items section select Top and enter 10 , then
in By value Section " Drag your Revenue "Measure" , then click on Apply Filter.
There you Go .
Please have a look in screenshot attached , and feel free to ask if any furtehr doubts.
If my answer solves the problem , mark it as a Solution.
Please Subscribe to my Youtube channel : https://www.youtube.com/@TheAnalyticsEngine
5 Replies
- govind_021
Super User
Hi Snagalapur
You need to perform the following steps :1) Select your visual
2) In Filter section , go to Filter on this visual section , and In your "Market List " Category
change the Filter Type to TopN , just below in show items section select Top and enter 10 , then
in By value Section " Drag your Revenue "Measure" , then click on Apply Filter.
There you Go .
Please have a look in screenshot attached , and feel free to ask if any furtehr doubts.
If my answer solves the problem , mark it as a Solution.
Please Subscribe to my Youtube channel : https://www.youtube.com/@TheAnalyticsEngine- AnonymousNot applicable
Hello,Kaviraj11 , Jihwan_Kim and govind_021 ,thanks for your concern about this issue.
Your answers are excellent!
And I would like to share some additional solutions below.
Hi,Snagalapur . I am glad to help you.
In addition to using Power BI directly by using the TopN function in the filters area. You can also use the sort function on the top ten data (the data for the absolute value of the calculation) to mark (create a measure), and will play a role in sorting and filtering measure added to your bar chart, as a filter condition!
Use TOPN function to create a virtual table for sorting, or use the RANKX function to create a measure are good choices.
The measure I created:Rank_Top10_SKIP = RANKX ( ALL ( 'Fact' ), CALCULATE ( SUM ( 'Fact'[Sales] ) ),, DESC, SKIP )
I hope you find the following test helpful
URL:TOPN function (DAX) - DAX | Microsoft Learn
RANKX function (DAX) - DAX | Microsoft LearnI hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- govind_021
Super User
Please follow below steps :
- Go to the Filters pane and click the dropdown beside Market in the visual-level filters.
- Select Top N.
- Enter 10 in the input box to show the top 10 products.
- Drag the Total Revenue measure into the By Value field.
- Click Apply Filter.
For Reference , have a look in below screenshotIf you find it as a solution , please accept it as a solution and subscribe to my youtube channel
https://www.youtube.com/@TheAnalyticsEngine
- Jihwan_Kim
Super User
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.