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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Mjdrejza1722
Helper I
Helper I

Cumulative Line appears to resest on another field. How to stop?

I have a combined column and line chart with a line for cumulative sum.  However, the line appears to reset with the change in CATEGORY, a field I want to use for the column legend.  How can I make the line ignore that field?  Why is affected by that field in the first place?  If I remove CATEGORY from the legend, the line still changes.   The DAX is below.

cumulative sum resetting on category.JPG


OnlySpend Cumulative 2 =
CALCULATE(
        SUM('table1'[Amount]),
        ALLSELECTED('table1'[DATE]),
        'table1'[DATE]<= MAX('table1'[DATE])
)
2 REPLIES 2
amitchandak
Super User
Super User

@Mjdrejza1722 , use a date table and try

 

OnlySpend Cumulative 2 =
CALCULATE(
SUM('table1'[Amount]),
ALLSELECTED('Date'),
'Date'[DATE]<= MAX('Date'[DATE])
)

 

or

 

OnlySpend Cumulative 2 =
CALCULATE(
SUM('table1'[Amount]),
ALL('Date'),
'Date'[DATE]<= MAX('Date'[DATE])
)

 

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

 

Check

Rolling Months Formula: https://youtu.be/GS5O4G81fww

 

Explore Window Function:

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

So, we determined that the date slicer was impacting the line.  When it's interaction was turned off (or when we deleted that slicer), the cumulative sum worked fine.  I still don't understand why, considering that the change occurred when the CATEGORY changed.  That said, for purposes of the project at this point, I have moved without understanding completely why.  I will review the videos you suggested, @amitchandak .  Thank you.  

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.