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
ppgandhi11
Helper V
Helper V

how to add serial number / row number in the visual?

Hi, how can i achieve this in my visual?  I cannot add the add column starting with 1 for this since that will be static. I need the row numbers for the visual so that it changes dynamically. Capture.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You can add a index column in Power Query which will have unique value and then use above logic based on index value.

 

Thanks
Raj

View solution in original post

5 REPLIES 5
Anonymous
Not applicable
Anonymous
Not applicable

Try this

 

rownum = CALCULATE(COUNTROWS(Table1),FILTER(ALLSELECTED(Table1),Table1[Name]<=MAX(Table1[Name])))

 

Thanks

Raj

I tried this already (got it from other post). It does not work in my case because I don’t have unique ID/name . It repeated. So if ID 1 has name abc repeated twice I will see 2,2 as row number for them instead of 1,2. Makes sense?
Anonymous
Not applicable

You can add a index column in Power Query which will have unique value and then use above logic based on index value.

 

Thanks
Raj

Yep. It works that way! Thanks!

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.