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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PavaniD
Helper I
Helper I

row number

Hello

I need row number for my table.I want it as a measure as my data model is Azure Analysis Services,I cant edit my data model.So I want a measure in report itself.

1 ACCEPTED SOLUTION
v-kongfanf-msft
Community Support
Community Support

Hi @PavaniD ,

 

As @Ritaf1983 said, you can implement the creation of line numbers by MEASURE through the rankx function.


The usual practice can be combined with the allselected function, which can be dynamically adjusted according to the slicer.

vkongfanfmsft_0-1712542893368.pngvkongfanfmsft_1-1712542904326.png

result_ = SUM('Table'[Value])

Index = RANKX(ALLSELECTED('Table'[Cate]),[result_])

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-kongfanf-msft
Community Support
Community Support

Hi @PavaniD ,

 

As @Ritaf1983 said, you can implement the creation of line numbers by MEASURE through the rankx function.


The usual practice can be combined with the allselected function, which can be dynamically adjusted according to the slicer.

vkongfanfmsft_0-1712542893368.pngvkongfanfmsft_1-1712542904326.png

result_ = SUM('Table'[Value])

Index = RANKX(ALLSELECTED('Table'[Cate]),[result_])

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

PavaniD
Helper I
Helper I

No,I dont have access to use edit query mode.So I want that as a measure only.

@PavaniD 
Then it sounds like you should use rankx function.
Take a look at the linked video :

https://www.youtube.com/watch?v=gXF47dSmIwI

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Ritaf1983
Super User
Super User

Hi @PavaniD 
You can add an index column with PQ:

Ritaf1983_0-1712321447931.png

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.