Forum Discussion
Anonymous
6 years agoNot applicable
RANKX ADDCOLUMNS Variable table syntax issue
Hi All, I need help wiht a rankx within a variable table. I need to use variables instead of calculated columns as the measure I am using is dynamic and I don't want to use multiple calculated column...
- 6 years ago
Hi Anonymous
one solution I found is the following formula (see figure 1), but it is equal with the shorter formula in figure 2.
Figure 1
Figure 2
Some notes about your formula:
- You have used a varibale to create a virtual table, here: Var Tbl. In RANKX() you need the ALL() function that expects only a table reference, not a table expression like Tbl.
- The measure Sum of TestTable[Value] should be calculated outside the formula.
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
FrankAT
6 years agoCommunity Champion
Hi Anonymous
one solution I found is the following formula (see figure 1), but it is equal with the shorter formula in figure 2.
Figure 1
Figure 2
Some notes about your formula:
- You have used a varibale to create a virtual table, here: Var Tbl. In RANKX() you need the ALL() function that expects only a table reference, not a table expression like Tbl.
- The measure Sum of TestTable[Value] should be calculated outside the formula.
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
- Anonymous6 years agoNot applicableThakns so much FrankAT, exactly what I need greatly appreciated.