Forum Discussion
How to create index on visual table
- 2 years ago
Harineeeeeeee The index column is not displaying unique values because of the ALLSELECTED function.
You can try using ALL('MainTable') instead of ALLSELECTED('MainTable')
IndexColumn = RANKX(ALL('MainTable'), 'MainTable'[id], , ASC, Dense)Or
Index = COUNTROWS(FILTER(ALL(MainTable), MainTable[id] < EARLIER(MainTable[id]))) + 1I hope this meets your needs. If so, please consider Accepting it as the solution to help others find it more quickly. OR
If my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!Best Regards,Dallas.
Harineeeeeeee The index column is not displaying unique values because of the ALLSELECTED function.
You can try using ALL('MainTable') instead of ALLSELECTED('MainTable')
IndexColumn = RANKX(ALL('MainTable'), 'MainTable'[id], , ASC, Dense)Or
Index = COUNTROWS(FILTER(ALL(MainTable), MainTable[id] < EARLIER(MainTable[id]))) + 1
I hope this meets your needs. If so, please consider Accepting it as the solution to help others find it more quickly. OR
If my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!
DallasBaba Thanks and Kudos! It worked