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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
NZ0090
Frequent Visitor

Add row number in matrix

Hi everyone,

 

I have a matrix that looks like this:

NZ0090_1-1680745072112.png

 

How do I add row numbers to the matrix? The matrix can be expanded multiple levels. I've tried some solutions I found on the internet and I couldn't figure out how to make it work and most of the solutions I found are used with tables instead of matrix. 

 

Additional note: 

- I'm using Direct Query

- Matrix can be sorted by either Sales or Qty

 

Any help is appreciated! Thank you

 

1 REPLY 1
amitchandak
Super User
Super User

@NZ0090 , As of now you do not have the row number of the serial number , You need have some column at source that can do that

In table visual, we can use the window to get row number as measure

Learn Power BI: Window as Rank- why and Why not: https://youtu.be/Pu8y8bd5mb8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.