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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
David1780
Frequent Visitor

Running Total (Quick Measure) not filtering when using a Date Table

Hello,

I have a Revenue Data from 2021-2023 in one Table which is linked to a Calendar Table as per the relationship below. When I create a Running Total measure (using the quick measure) which references the Revenue from 1 table and the Date from the Calendar Table, it works as expected but when I Filter the visual to a particular year (like just 2022), the running total doesnt start from zero as its keeps the previous years revenue in the calculation. 

David1780_0-1684026093624.png

Revenue running total in Date =
CALCULATE(
    SUM('QryMonthlyProjectRevenueReport'[Revenue]),
    FILTER(
        ALLSELECTED('Calendar'[Date]),
        ISONORAFTER('Calendar'[Date], MAX('Calendar'[Date]), DESC)
    )
)
All Revenue Data and Running Total:
David1780_1-1684026284686.png 
Revenue Date filtered to 2022 and Running Total:
David1780_2-1684026370437.png

I would like the first value in the RT to be $332k then $766k.

 

Thanks in advance.

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, 

I am not sure if the calendar table is assigned as a CALENDAR table, but please try something like below whether it produces the desired outcome or not.

 

Revenue running total in Date =
CALCULATE (
    SUM ( 'QryMonthlyProjectRevenueReport'[Revenue] ),
    FILTER (
        ALLSELECTED ( 'Calendar' ),
        'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi, 

I am not sure if the calendar table is assigned as a CALENDAR table, but please try something like below whether it produces the desired outcome or not.

 

Revenue running total in Date =
CALCULATE (
    SUM ( 'QryMonthlyProjectRevenueReport'[Revenue] ),
    FILTER (
        ALLSELECTED ( 'Calendar' ),
        'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.