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
Anonymous
Not applicable

Running Total Measure with Filter

Hey guys,

I've got the following Measure:

Visits My Page = CALCULATE(
DISTINCTCOUNT('All Page Visits'[VISIT_ID]),
FILTER('All Page Visits','All Page Visits'[PAGE_URL]="https://my.page.nl/login")

Resulting in the following table:
LaZZaNoVa61_1-1650379721968.png

 

But I'm trying to make a measure for the running total. I'm struggling due to the fact that I have a filter.
Is it possible to use the measure above in another measure?

With kind regards,

Önder



1 ACCEPTED SOLUTION
johnt75
Super User
Super User

yes, you could do something like

Running Total =
var maxDate = MAX('Date'[Date])
return CALCULATE( [Visits My Page], REMOVEFILTERS( 'Date'), 'Date'[Date] <= maxDate)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Wow Johnt75,

This helped me a lot. I really need to learn how to work with variables I guess...
Thanks a lot.

johnt75
Super User
Super User

yes, you could do something like

Running Total =
var maxDate = MAX('Date'[Date])
return CALCULATE( [Visits My Page], REMOVEFILTERS( 'Date'), 'Date'[Date] <= maxDate)

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.