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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RMDNA
Solution Sage
Solution Sage

Excluding running total from date filter context

Hi all,

Quick question about keeping a running total unfiltered (but still visually limited) when a date slicer is applied. 

I have a visual here with a running total line (orange). In January of 2021, the total users were just over 32,000. The running total code is below:

 

Spoiler
Running Total = 
CALCULATE(DISTINCTCOUNT(Table1[users]),
    FILTER(
        ALLSELECTED(Table1),
        Table1[date] < MAX(Table1[date])
    )
)

 

RMDNA_0-1624034301085.png

However, when I filter the date axis, that number drops to 250. 

 

RMDNA_1-1624034370579.png

 

What I'm looking to do is still visually focus on that time period (Jan - June 2021), but keep the count of total users unaffected (e.g. show 32,000 - 33,000 over that same period).

 

1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @RMDNA 

 

Have a try

Running Total = 
CALCULATE(DISTINCTCOUNT(Table1[users]),
    FILTER(
        ALL(Table1[date]),
        Table1[date] < MAX(Table1[date])
    )
)

View solution in original post

1 REPLY 1
Vera_33
Resident Rockstar
Resident Rockstar

Hi @RMDNA 

 

Have a try

Running Total = 
CALCULATE(DISTINCTCOUNT(Table1[users]),
    FILTER(
        ALL(Table1[date]),
        Table1[date] < MAX(Table1[date])
    )
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.