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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply

Matrix: rows counter and cumulative total

Hi experts,

i have a matrix with 3 dimensions and some measures.

i want to add two new value but in this moment i can't find a solution for them.

 

The first one is a simply counter of the rows that it should be always start from 1, something like this:

RowsCounter.jpg

I have done it with the RANKX function but it always depend by the value and the dimensions.. i want only a counter.

 

The second one is the running total of the value "Valore" which is simply a sum of a value (SUM(Dati[Valore])).

Also in this case the sum will be dynamic and will be depending by the dimension you are looking for and by the sorting of the table.

 

Are those possibile?

 

Thank's

7 REPLIES 7
Anonymous
Not applicable

@simonefraquelli,

Could you please share sample data of your table and post expected result of your second requirement?

I create row counter column using DAX below in the following sample table.

Row counter = RANKX(FILTER(Table1,Table1[Type]=EARLIER(Table1[Type])),Table1[Value],,DESC,Dense)

1.JPG2.JPG

Regards,
Lydia

Hi Lydia,

thank's, but this is not the solution for me.

 

In my dataset i have a table which contains the data and the quantity/value filed, it's something like this:

11.JPG

 

In this case the trick with RANKX function doesn't work because he always depend by a dimension, i need just a simply ascending counter of the rows in the table, is there the possibility to do it?

Anonymous
Not applicable

@simonefraquelli,

In your sample table, you can directly add an idex column.
1.JPG

Regards,
Lydia

@Anonymous

 

Yes, i know it, but i don't need a row counter of the data table, i need a row counter of the visual matrix table that it should work like a normal measure.

Is this possibile?

 

11.jpg

 

Thank's

Anonymous
Not applicable

@simonefraquelli,

How do you create Matrix visual using the sample table named Data?

Regards,
Lydia

@Anonymous

 

Why?

The Data table is only a small example about my real one table.

 

Anyway the matrix is created with the dimensions in the table and some measure based on the quantity/value fields.

 

Anonymous
Not applicable

@simonefraquelli,

1.JPG


Create the following measure in your fact table.

Row counter= RANKX(ALLSELECTED('Table'[Agente]), [Valore],,DESC,Skip)

Regards,
Lydia

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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