Hi All,

New to power query in Excel. Is there a way I can get a running count based on a reoccuring value in a column, and start a new running count based on new values?

Cannot find the equivalent of count/countif in PQ.

Here's an example of what I'm trying to achieve.

Input

Name Values

A.N.Other01 13

A.N.Other01 23

A.N.Other01 100

A.N.Other01 122

A.N.Other01 156

A.N.Other01 347

A.N.Other01 2135

A.N.Other02 45

A.N.Other02 124

A.N.Other02 783

A.N.Other02 2345

A.N.Other03 5

A.N.Other04 35

A.N.Other05 67

A.N.Other06 23

A.N.Other06 23

A.N.Other06 32

A.N.Other06 58

A.N.Other06 67

Output

Name Values Col1 Col2

A.N.Other01 13 1 0

A.N.Other01 23 1 1

A.N.Other01 100 1 2

A.N.Other01 122 1 3

A.N.Other01 156 1 4

A.N.Other01 347 1 5

A.N.Other01 2135 1 6

A.N.Other02 45 2 0

A.N.Other02 124 2 1

A.N.Other02 783 2 2

A.N.Other02 2345 2 3

A.N.Other03 5 3 0

A.N.Other04 35 4 0

A.N.Other05 67 5 0

A.N.Other06 23 6 0

A.N.Other06 23 6 1

A.N.Other06 32 6 2

A.N.Other06 58 6 3

A.N.Other06 67 6 4

Thanks,

Jon

New to power query in Excel. Is there a way I can get a running count based on a reoccuring value in a column, and start a new running count based on new values?

Cannot find the equivalent of count/countif in PQ.

Here's an example of what I'm trying to achieve.

Input

Name Values

A.N.Other01 13

A.N.Other01 23

A.N.Other01 100

A.N.Other01 122

A.N.Other01 156

A.N.Other01 347

A.N.Other01 2135

A.N.Other02 45

A.N.Other02 124

A.N.Other02 783

A.N.Other02 2345

A.N.Other03 5

A.N.Other04 35

A.N.Other05 67

A.N.Other06 23

A.N.Other06 23

A.N.Other06 32

A.N.Other06 58

A.N.Other06 67

Output

Name Values Col1 Col2

A.N.Other01 13 1 0

A.N.Other01 23 1 1

A.N.Other01 100 1 2

A.N.Other01 122 1 3

A.N.Other01 156 1 4

A.N.Other01 347 1 5

A.N.Other01 2135 1 6

A.N.Other02 45 2 0

A.N.Other02 124 2 1

A.N.Other02 783 2 2

A.N.Other02 2345 2 3

A.N.Other03 5 3 0

A.N.Other04 35 4 0

A.N.Other05 67 5 0

A.N.Other06 23 6 0

A.N.Other06 23 6 1

A.N.Other06 32 6 2

A.N.Other06 58 6 3

A.N.Other06 67 6 4

Thanks,

Jon

Last edited: