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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.