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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
sertim
New Member

incremented if

Hi!

I have table with column 'owner'.

I need to make 'index' which is incremented if the owner is equal to 'G' :

owner   ...   index

G                  1

S                  1

G                  2

S                  2

G                  3

T                  3

T                  3

T                  3

T                  3

S                  3

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sertim,

 

I think you need to add an original sort index column to let the formula loop through the table.

 

 

Below is the sample.

 

Original table:

1.PNG

 

Write calculated column to calculate index based on id.

Index = COUNTROWS(FILTER(ALL('Sample'),[ID]<=EARLIER([ID])&&[Owner]="G"))+0

Result:

2.PNG

 

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @sertim,

 

I think you need to add an original sort index column to let the formula loop through the table.

 

 

Below is the sample.

 

Original table:

1.PNG

 

Write calculated column to calculate index based on id.

Index = COUNTROWS(FILTER(ALL('Sample'),[ID]<=EARLIER([ID])&&[Owner]="G"))+0

Result:

2.PNG

 

Regards,

Xiaoxin Sheng

It works!

This is what I need.

Many thanks.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.