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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors