Showing results for 
Search instead for 
Did you mean: 
chrischiappazzo Regular Visitor
Regular Visitor

Incremental CountIF DAX

I have a formula in excel that is =COUNTIF($P$2:$P2,P2) and have been looking around the forums for a replica in PBI but am having no luck.


Is anyone able to help me.. What the desired result is for example would be..


ID:                 Count:                          All i have been able to manage at the moment is this (which Is not helpful)

1                     1                                  1

2                     1                                  1

3                     1                                  3

3                     2                                  3

3                     3                                  3

4                     1                                  2

4                     2                                  2

5                     1                                  1

6                     1                                  1


Can someone please help out with this..

vbisen Frequent Visitor
Frequent Visitor

Re: Incremental CountIF DAX

You can add an Index column starting with 1 in your query. This will have unique value for each row.

Post this create calculated measure as 

Running Count =
FILTER(All('Table'), 'Table'[Index]<=MAX('Table'[Index])),
)Running Count.png

Helpful resources

New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)