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
William_Moreno
Helper II
Helper II

count adding one to each count made

Hi everyone,

I have a table with the order code, as you see below, the code appears 3 times, I woud like to create a column to count without repeating the number "3", but count adding one to each count made. 

 

order-numberCountCorrect Count
10050050031
10050050032
1005005003 3


Thanks

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @William_Moreno ,

 

One way would be

 

Create an index Column in Power Query.

 

1.jpg

 

 

Then create a  Calculated Column

 

Correct Count Column = RANKX(FILTER('Table','Table'[order-number] = EARLIER('Table'[order-number])),'Table'[Index],,ASC,Dense)

 

 

2.JPG

 

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

1 REPLY 1
harshnathani
Community Champion
Community Champion

Hi @William_Moreno ,

 

One way would be

 

Create an index Column in Power Query.

 

1.jpg

 

 

Then create a  Calculated Column

 

Correct Count Column = RANKX(FILTER('Table','Table'[order-number] = EARLIER('Table'[order-number])),'Table'[Index],,ASC,Dense)

 

 

2.JPG

 

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

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.