Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Index column in dax

Hello Evrybody, i wanna create an index column in dax (not in power query) based on a number. Here's the result wanted.

Any help, please !

yja_0-1670257424969.png

 

1 ACCEPTED SOLUTION

Hi, @Anonymous 

Maybe you can try adding small random numbers for sorting.

Calculated column:

Column = 'Table'[Number]+RAND()/1000
Rank1 = RANKX(ALL('Table'),'Table'[Column],,ASC,Dense)

veasonfmsft_0-1670319982471.png

 

Best Regards,
Community Support Team _ Eason

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

There's no magic formule that can helps me do that ? 

Hi, @Anonymous 

Maybe you can try adding small random numbers for sorting.

Calculated column:

Column = 'Table'[Number]+RAND()/1000
Rank1 = RANKX(ALL('Table'),'Table'[Column],,ASC,Dense)

veasonfmsft_0-1670319982471.png

 

Best Regards,
Community Support Team _ Eason

 

Anonymous
Not applicable

I can't do that because my column doesn't only contains numbers. It contains text fileds too such as "A1000".

Anonymous
Not applicable

I converted that column to text and then i used the function concatenate and it's working.

Thank you so much everbody 🙂

v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

Usually we can use "Rankx" to create an index column if your column does not contain duplicate values.

Currently, It is almost impossible to create an index column based on a column containing duplicate values in DAX.

Best Regards,
Community Support Team _ Eason

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors