Forum Discussion
Counting rows with lower value
- 5 years ago
Hi Anonymous
thank you for your reply.
Because you have same VII ID, and property of column Sąnaudos is Sum, so it will categorize automatically according to VII ID in table visual. If you don’t need total row, you can change the property to Don’t summarize,
Result:
Or if you need total row, try this.
Create the 2 measure:
calculatesum = CALCULATE(SUM('Sąnaudų lentelė'[Sąnaudos]),ALLEXCEPT('Sąnaudų lentelė','Sąnaudų lentelė'[VII ID]))No of lower values = RANKX(ALL('Sąnaudų lentelė'),[calculatesum],,,Dense)FYI:https://docs.microsoft.com/en-us/dax/rankx-function-dax
Result:
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hey, thank you that was the result what I was expectecting, but as I applied it in my data setup it did not give me the same result. I am attaching a PBI desktop file for more context:
Example
What I am trying to achieve here is count the percentile of Sąnaudos (expences), for every VII ID. For that I need a count of VII that have lower value of Sąnaudos, than the selected value. Does that make sence?
Hi Anonymous
thank you for your reply.
Because you have same VII ID, and property of column Sąnaudos is Sum, so it will categorize automatically according to VII ID in table visual. If you don’t need total row, you can change the property to Don’t summarize,
Result:
Or if you need total row, try this.
Create the 2 measure:
calculatesum = CALCULATE(SUM('Sąnaudų lentelė'[Sąnaudos]),ALLEXCEPT('Sąnaudų lentelė','Sąnaudų lentelė'[VII ID]))No of lower values = RANKX(ALL('Sąnaudų lentelė'),[calculatesum],,,Dense)
FYI:https://docs.microsoft.com/en-us/dax/rankx-function-dax
Result:
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years agoNot applicable
Thank you,!