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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Cumulative count

Hi,

 

I have this table where I have trouble getting the correct cumulative values. I would like have a cumulative count column that is not 1, 1, 1, but instead 08/07 = 2, 25/07 = 3 etc. 

 

lavmads_0-1667395500285.png

 

I did this measure: 

Cumulative_count =
VAR DATE_SELECT = SELECTEDVALUE(Kalender[Date])
VAR COUNT_STATUS = COUNT(Data[Intern status])
RETURN CALCULATE(COUNT_STATUS, Kalender[Date] <=DATE_SELECT)
 
But what is missing? 
 
Best regards,
Lisa 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

If you don't want to expand your table visual to show cumulative count in continuous date, you don't need to use [Date] in 'Kalendar' table. Or you can add a 'IF' function in your measure.

cumm = 
IF (
    COUNT ( Data[Intern status] ) <> BLANK (),
    CALCULATE (
        COUNT ( Data[Intern status] ),
        FILTER ( ALL ( Kalendar[Date] ), 'Kalendar'[Date] <= MAX ( Kalendar[Date] ) )
    )
)

Result is as below.

RicoZhou_0-1667464401134.png

 

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

If you don't want to expand your table visual to show cumulative count in continuous date, you don't need to use [Date] in 'Kalendar' table. Or you can add a 'IF' function in your measure.

cumm = 
IF (
    COUNT ( Data[Intern status] ) <> BLANK (),
    CALCULATE (
        COUNT ( Data[Intern status] ),
        FILTER ( ALL ( Kalendar[Date] ), 'Kalendar'[Date] <= MAX ( Kalendar[Date] ) )
    )
)

Result is as below.

RicoZhou_0-1667464401134.png

 

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@Anonymous 
I actually want to visually show the data in a line chart. Can I use the same equation? 

amitchandak
Super User
Super User

@Anonymous , make sure you are using a date table and date table in visual

 

cumm = CALCULATE(COUNT(Data[Intern status]),filter(all('Date'),'Date'[date] <=max('Date'[date])))

 

Running Total/ Cumulative: https://www.youtube.com/watch?v=h2wsO332LUo&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=41

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.