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
MikeDubya
Frequent Visitor

Reverse Cumulative sum issues

I have a calculated column that performs a reverse cumulative total. Without adding the reverse cumulatative column, I have a list of dates and whether a pilot landed during the day.  

MikeDubya_0-1678886996111.png

When I add my Reverse Column, it adds dates with blank LNDG Day and places the total in the Reverse Column:

MikeDubya_1-1678887062293.png

Here is my Dax Code:

Reverse Cumulative Total =
CALCULATE(
    SUM(Pilot[LNDG Day]),
    FILTER(ALL(Pilot[Depart Date (Z)]), Pilot[Depart Date (Z)] >= MIN(Pilot[Depart Date (Z)])))
 
What am I missing in my DAX code that would prevent the "12's" from showing up? Clearing I just want the 0, 0, 1, 3, not 0, 12, 0, 12, 1, 12, 12, 3 (from bottom up).
 
TIA!
1 REPLY 1
amitchandak
Super User
Super User

@MikeDubya , you should always prefer a separate date table joined with date of your table

 

Reverse Cumulative Total =
CALCULATE(
SUM(Pilot[LNDG Day]),
FILTER(ALL(Date), DateDate >= Max(Date[Date])))

 

Windows function can help

Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc

 

Running Total/ Cumulative: https://www.youtube.com/watch?v=h2wsO332LUo&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=41

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.