Forum Discussion
Combination Field parameter - TopN - Legend not working
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
Anonymous 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] ) )
2 Replies
- parry2kSuper User
Anonymous 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] ) )- AnonymousNot applicable
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 !