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
ronbermudez
Helper I
Helper I

Count Sequential Duplicate Same Values in a Column

Can anyone please help me count duplicate values in a column? 

The values are referenced off a Run column and must be kept in that order.

The Value column could contain duplicate values.  These duplicate values need to be counted sequentially in a calculated column but based on the sequence contained in the run column.

 

I'm not having any luck at all...

 

For example:

The sum of the value in the VALUE column, last column, will change dependent on filtering.  The run column will always be sequential but vary in run count.

 

Current:

Part Test_Type Rd_Wr Vendor Cap Band Rnk Ch By Pn Run Value
A 84 rd type1 ss 6 7 0 0 0 0 1 76
A 84 rd type1 ss 6 7 0 0 0 0 2 84
A 84 rd type1 ss 6 7 0 0 0 0 3 76
A 84 rd type1 ss 6 7 0 0 0 0 4 76
A 84 rd type1 ss 6 7 0 0 0 0 5 76
A 84 rd type1 ss 6 7 0 0 0 0 6 84
A 84 rd type1 ss 6 7 0 0 0 0 7 76
A 84 rd type1 ss 6 7 0 1 0 0 1 68
A 84 rd type1 ss 6 7 0 1 0 0 2 76
A 84 rd type1 ss 6 7 0 1 0 0 3 68
A 84 rd type1 ss 6 7 0 1 0 0 4 68
A 84 rd type1 ss 6 7 0 1 0 0 5 76
A 84 rd type1 ss 6 7 0 1 0 0 6 68
A 84 rd type1 ss 6 7 0 1 0 0 7 68
B 84 rd type1 hy 6 7 0 0 0 0 1 76
B 84 rd type1 hy 6 7 0 0 0 0 2 76
B 84 rd type1 hy 6 7 0 0 0 0 3 76
B 84 rd type1 hy 6 7 0 0 0 0 4 76
B 84 rd type1 hy 6 7 0 0 0 0 5 76
B 84 rd type1 hy 6 7 0 0 0 0 6 76
B 84 rd type1 hy 6 7 0 0 0 0 7 76
B 84 rd type1 hy 6 7 0 1 0 0 1 76
B 84 rd type1 hy 6 7 0 1 0 0 2 76
B 84 rd type1 hy 6 7 0 1 0 0 3 76
B 84 rd type1 hy 6 7 0 1 0 0 4 76
B 84 rd type1 hy 6 7 0 1 0 0 5 76
B 84 rd type1 hy 6 7 0 1 0 0 6 76
B 84 rd type1 hy 6 7 0 1 0 0 7 92

 

Desired is the last column (below).  Keep in mind that the count sequence restarts after the last number in the Run column ends.

In this example it ends at 7, but this ending number could change.  Also, the sum of the value in the Value column could change depending on parameter filtering, but the run count will remain the same.

 

Part Test_Type Rd_Wr Vendor Cap Band Rnk Ch By Pn Run Value Count
A 84 rd type1 ss 6 7 0 0 0 0 1 76 1
A 84 rd type1 ss 6 7 0 0 0 0 2 84 1
A 84 rd type1 ss 6 7 0 0 0 0 3 76 1
A 84 rd type1 ss 6 7 0 0 0 0 4 76 2
A 84 rd type1 ss 6 7 0 0 0 0 5 76 3
A 84 rd type1 ss 6 7 0 0 0 0 6 84 1
A 84 rd type1 ss 6 7 0 0 0 0 7 76 1
A 84 rd type1 ss 6 7 0 1 0 0 1 68 1
A 84 rd type1 ss 6 7 0 1 0 0 2 76 1
A 84 rd type1 ss 6 7 0 1 0 0 3 68 1
A 84 rd type1 ss 6 7 0 1 0 0 4 68 2
A 84 rd type1 ss 6 7 0 1 0 0 5 76 1
A 84 rd type1 ss 6 7 0 1 0 0 6 68 1
A 84 rd type1 ss 6 7 0 1 0 0 7 68 2
B 84 rd type1 hy 6 7 0 0 0 0 1 76 1
B 84 rd type1 hy 6 7 0 0 0 0 2 76 2
B 84 rd type1 hy 6 7 0 0 0 0 3 76 3
B 84 rd type1 hy 6 7 0 0 0 0 4 76 4
B 84 rd type1 hy 6 7 0 0 0 0 5 76 5
B 84 rd type1 hy 6 7 0 0 0 0 6 76 6
B 84 rd type1 hy 6 7 0 0 0 0 7 76 7
B 84 rd type1 hy 6 7 0 1 0 0 1 76 1
B 84 rd type1 hy 6 7 0 1 0 0 2 76 2
B 84 rd type1 hy 6 7 0 1 0 0 3 76 3
B 84 rd type1 hy 6 7 0 1 0 0 4 76 4
B 84 rd type1 hy 6 7 0 1 0 0 5 76 5
B 84 rd type1 hy 6 7 0 1 0 0 6 76 6
B 84 rd type1 hy 6 7 0 1 0 0 7 92 1

 

Sorry for the cut and paste as it turned out to be space delimited.

 

 

 

12 REPLIES 12

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.