Forum Discussion
Anonymous
8 years agoNot applicable
Add a Calculated index column using DAX
Hello All,
How can we create a index calculated column or measure using DAX, like we do in power query.
Any help.
Mohan V
Hi Anonymous,
What does your data source look like? I create the following sample table and get expected result.
sample table
I create measure using the formula below.Index = RANKX(ALL(Test),FIRSTNONBLANK(Test[Project ID],Test[Project ID]),,ASC,Dense)
Then create a table, select the Project ID and measure as the value level, you will get expected result as follows.
Best Regards,
Angelia
9 Replies
- spuderResolver IV
Hi Anonymous,
have you tried to use the RANKX() function. This calculates a ranking depending on a value. So you should be able to generate an index column with it.
Greetings
spuder
- AnonymousNot applicable
- spuderResolver IV
Anonymouswhat is the sort order of your table and does it has duplicate values in the sorted columns?