Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi all,
I'm having a difficult time to show Top 5 Legend based on a Year-Month Trend Chart with a Field Parameter.
Data I have :
Field Parameter : Dim
Values (Region , Customer)
Slicers : Market, Segment, Category
Line Graph : Year Month on X-axis
Sum of Sales on Y-axis
Field Parameter on Legend
Expectation :
1, Showing Top 5 based on "Profit" when selecting Field Parameter "Customer", should show everything when selecting "Region".
Note : on line graph, we are ploting "Sales" measure but Top N needs to find based on "Profit"
2, Slicers should affect the top 5
3, For below selection line should show trend of "first 5 people from the table"
Download the above PBIX file : Click Here
Appreciate if someone crack this fast as we are having a PBI Migration.
Regards,
Rinto
I'm sorry I can't open your link. If your problem hasn't been solved yet, please provide detailed sample data: How to provide sample data in the Power BI Forum - Microsoft Fabric Community . Or show it as a screenshot. Please remove any sensitive data in advance.
Best Regards,
Community Support Team _Yuliax
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@rintoalappat , Create region sale
Region sales = calculate(sum(Orders[Sales]), Filter(ALLSELECTED(Orders), Orders[Region]= max(Orders[Region])))
Then use this measure in visual
Switch Sales = var _selected = maxx(FILTER('Select Dim', 'Select Dim'[Select Dim Order] = SELECTEDVALUE('Select Dim'[Select Dim Order])), 'Select Dim'[Select Dim])
return
Switch( _selected,
"Customer", sum(Orders[Sales]),
"Region",CALCULATE(Sum(Orders[Sales]), KEEPFILTERS(TOPN(5, ALLSELECTED(Orders[Region]),[Region sales],DESC))))
File is attached
Thank you and appreciate you time on this solution.
I was trying and found there are few more steps: (please check the highlighted)
1, Showing Top 5 based on "Profit" when selecting Field Parameter "Customer", should show everything when selecting "Region".
Note : on line graph, we are showing "Sales" measure but Top N needs to find based on "Profit"
I missed to enter this in my first post. Could you please try with this modification and let me know. Thanks in advance
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
82 | |
57 | |
41 | |
37 |