Forum Discussion
Ranking value changed when filtering only one value
- Anonymous1 year ago
Hi All,
Firstly ryan_mayu and techies thank you for yours solutions!
And Bourne_Xian ,According to your question, after a long time verification, we found that it is because of the date filter's effect on the category A that it can't display the correct value properly, so based on this, we just need to create a new calculation table to make sure that our category A won't receive the effect of the date filter, then we can display the value we want to need.Measure = VAR rankedCategories = SUMMARIZE ( ALLSELECTED ( data[Category A] ), [Category A], "Test", [Rank Category A by Measure 1] ) RETURN SUMX ( FILTER ( rankedCategories, [Category A] IN VALUES ( 'Table'[Value] ) ), [Test] )Rank Category A by Measure 1 = IF( HASONEVALUE(data[Category A]), RANKX( ALLSELECTED(data[Category A]), calculate(SUM(data[ Measure 1 ])) ) )Table = SUMMARIZE(data,[Category A])If you have further questions you can check out my pbix file, I hope this helps and I would be honored if I could solve your problem!
Hope it helps!
Best regards,
Community Support Team_ Tom ShenIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi All,
Firstly ryan_mayu and techies thank you for yours solutions!
And Bourne_Xian ,According to your question, after a long time verification, we found that it is because of the date filter's effect on the category A that it can't display the correct value properly, so based on this, we just need to create a new calculation table to make sure that our category A won't receive the effect of the date filter, then we can display the value we want to need.
Measure =
VAR rankedCategories =
SUMMARIZE (
ALLSELECTED ( data[Category A] ),
[Category A],
"Test", [Rank Category A by Measure 1]
)
RETURN
SUMX ( FILTER ( rankedCategories, [Category A] IN VALUES ( 'Table'[Value] ) ), [Test] )Rank Category A by Measure 1 =
IF(
HASONEVALUE(data[Category A]),
RANKX(
ALLSELECTED(data[Category A]),
calculate(SUM(data[ Measure 1 ]))
)
)Table = SUMMARIZE(data,[Category A])
If you have further questions you can check out my pbix file, I hope this helps and I would be honored if I could solve your problem!
Hope it helps!
Best regards,
Community Support Team_ Tom Shen
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your kindly help. Provided solution looks good 👍