Forum Discussion
Add a Calculated index column using DAX
- 8 years ago
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
spuder I just tried this.
But i got the output which i am not expecting.
I would like to get the no of rows that i will be having in that table dynamically,
like in that above image i should get as 1
2
3
4
5
Values.
Any help
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
- gvg7 years agoPost Prodigy
You can't rely on RANKX when adding Index as RANKX generates same index for the similar target column values.