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
Anonymouswhat is the sort order of your table and does it has duplicate values in the sorted columns?
spuder it is ascending and no it dont have any duplicate values.
- spuder8 years agoResolver IV
Anonymous
then it should be working with RANKX()
- Anonymous8 years agoNot applicable
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
- v-huizhn-msft8 years agoMicrosoft Employee
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