Forum Discussion
Anonymous
6 years agoNot applicable
RankX with 2 fields
Hello All. For some reason 1 RankX formula works but the other doesnt. Below is Dax: Product Rank (Name) = VAR CURRENTPRODUCT = MAX('(Dim) Product'[Product_Name]) RETURN RANKX(FILT...
v-kelly-msft
6 years agoCommunity Support
Hello @Roberto456 ,
Your formulas are calculated columns, right?
If so, modify them as follows:
Product Rank (Name) =
RANKX(FILTER(ALLSELECTED('(Dim) Product'),'(Dim) Product'[Product_Name] = EARLIER('(Dim) Product'[Product_Name])),[Master],,DESC,Dense)Product Rank (Category) =
RANKX(FILTER(ALLSELECTED('(Dim) Product'),'(Dim) Product'[Category] =EARLIER('(Dim) Product'[Category] )),[Master],,DESC,Dense)
Saludos
Kelly
Kelly
Did I answer your question? Mark my position as a solution!
- Anonymous6 years agoNot applicable
Hello.
I found the solution.
No these are measures, for dynamic ranking.
The problem was, that unless I put in the 2nd field as the most granular part of the product (from the table being referenced) the ranking wouldnt work.
which is why category / product wouldn't work, (product wasnt the most granular field).
I had to duplicate the product table and make sure that product name was the most granular field and then reference that table instead.
I would have preffered to use a VAR table, but I couldnt find a way to RankX from it.