Forum Discussion
nleuck
6 years agoPost Patron
Rank by measure in Direct Query
Hello All, I'm trying to rank Branch Locations by a measure that finds the % of products with no sales to total inventory. When I try to create the rank measure in the visual all the locations ar...
nleuck
6 years agoPost Patron
amitchandak
6 years agoSuper User
What is the issue? Are getting the same rank. try one with All, in place of allselected and check if is giving expected results
- nleuck6 years agoPost Patron
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)