Forum Discussion
Rank by measure in Direct Query
What is the issue? Are getting the same rank. try one with All, in place of allselected and check if is giving expected results
I'm getting the same rank. I even tried ALL instead of ALLSELECTED and got the same results.
- amitchandak6 years agoSuper User
I tried a similar query on the Direct query on SQL server. and seem have worked
- nleuck6 years agoPost Patron
Below I have another example when trying to use RANKX. The left table works just fine, but as soon as I add description to the table it ranks everything as 1. I don't understand why.
Formula:
Rank by Product = RANKX(ALL('table1'[product_id]), CALCULATE(SUM('table1'[available_value])),, DESC, Skip)- amitchandak6 years agoSuper User
When we this category ranking, if we add any other group by, it tries to rank inside that. So as soon as you drag description the rank of product is the inside description, which is only 1.
For Rank Refer these links, if you can find a suitable option
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale