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,
see my test.pbix
https://www.dropbox.com/scl/fi/puhpfn9b0cx17hnmos2ty/test.pbix?rlkey=tlzbha299p9yybf38xrkk1aye&dl=0
In this pbix I combine a field parameter with a variable TopN.
Choosing in this situation for a Top5, 10 or 25 always gives the correct result.
But when I put the attribute Channel from query Sales in the Legend of the stacked bar chart, it gives strange results like this when choosing for Top5.
Why is this happening and how can I solve it? Because I would like to have that subdivision in the bars.
Regards
Ron
Solved! Go to Solution.
@PowerRon update your measure to remove the filter from the channel column, as a good design there should be another dimension table for channels.
SELECTEDVALUE(FP_Sales[Measures Fields]) = "'Sales'[Sum Sales Qty]",
CALCULATE(
RANKX(
ALLSELECTED(Regions[Country]),
[Sum Sales Qty],,DESC
),
REMOVEFILTERS(Sales[Channel] )
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@PowerRon update your measure to remove the filter from the channel column, as a good design there should be another dimension table for channels.
SELECTEDVALUE(FP_Sales[Measures Fields]) = "'Sales'[Sum Sales Qty]",
CALCULATE(
RANKX(
ALLSELECTED(Regions[Country]),
[Sum Sales Qty],,DESC
),
REMOVEFILTERS(Sales[Channel] )
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k
I agree that Channel should be in a separate dimension.
Can you explain to me in a simple way why I should use REMOVEFILTERS here?
If Channel was in a separate dimension, wouldn't it have occured then?
By the way, thnx for helping me out !
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
126 | |
113 | |
71 | |
65 | |
46 |