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.
could you pls provide some sample data and expected output?
Hi Ryan,
Thanks for your time.
You could find the sample data provided in another post which have extractly same issue: https://www.dropbox.com/s/fhbpj7pgragr2g6/Ranking%20test.pbix?dl=0
Expected output for 27_Cat is 25, while actual output is 8.
The expected output for 6_Cat is 6, while actual output is 5.