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

Cumulative Total and Filter

Hi Community,

 

this is my first post and I have already browsed the web for solutions, but somehow, I am stuck. 😕

So I am trying to show cumulated training completions per date (run-up) in a graph - see below:

When I use the filters on the left, the charts look exactly as I planned to.

 

yojoe_0-1628242751341.png

 

But if I remove the filter and show the "overall cumulations", then the graphs are screwed. 😞

yojoe_1-1628242824154.png

 

 

I am using the following formula to calculate the cumulative completions.

 

Cumulative MEASURE =
VAR LastVisibleDate =
MAX ( 'TKLMSREPORT - 2021-08-02T144129 529'[Completion Date] )
VAR FirstVisibleDate =
MIN ( 'TKLMSREPORT - 2021-08-02T144129 529'[Completion Date] )
VAR LastDateWithSales =
CALCULATE (
MAX ( 'TKLMSREPORT - 2021-08-02T144129 529'[Completion Date] ),
REMOVEFILTERS ('TKLMSREPORT - 2021-08-02T144129 529'[Completion Date])
)
VAR Result =
IF (
FirstVisibleDate <= LastDateWithSales,
CALCULATE (
COUNTA([User ID]),
'TKLMSREPORT - 2021-08-02T144129 529'[Completion Date] <= LastVisibleDate
)
)
RETURN
Result

 

What's wrong? I also found a way to make the overall look good, but then the filter per region does not work:

 

Cumulative MEASURE =
CALCULATE(COUNTA('TKLMSREPORT - 2021-08-02T144129 529'[User ID]),
FILTER (ALLEXCEPT('TKLMSREPORT - 2021-08-02T144129 529', Tabelle1[Title]),
'TKLMSREPORT - 2021-08-02T144129 529'[Completion Date] <= MAX ('TKLMSREPORT - 2021-08-02T144129 529'[Completion Date])
)
)
2 REPLIES 2
Anonymous
Not applicable

Thanks for your response! To be honest, I do not know whether we need to define and ELSE rule. I found nothing about that in my research. I think here, it's more used as a "WHILE"...!?

lbendlin
Super User
Super User

VAR Result =
IF (
FirstVisibleDate <= LastDateWithSales,
CALCULATE (
COUNTA([User ID]),
'TKLMSREPORT - 2021-08-02T144129 529'[Completion Date] <= LastVisibleDate
)
)

 

What should happen if the condition is not met?

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.