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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
MercedesL
New Member

Forecast Cumulative Line Graph, Flat Lines in Previous Years

I cannot get my graph for the past 3 years to work as a cumulative graph by year Month over Month. Here is my DAX code for 2024 (the code is the dsame for 2023 and 2025:
CumulativeSpending2024 =
VAR CurrentMonth = MAX('Central Division Tuition (4)'[MonthYear])
RETURN
    CALCULATE(
        SUM('Central Division Tuition (4)'[Amount DR]),
        FILTER(
            ALL('Central Division Tuition (4)'),
            YEAR('Central Division Tuition (4)'[MonthYear]) = 2024 &&
            'Central Division Tuition (4)'[MonthYear] <= CurrentMonth
        )
    )

I notice when I drill down that the flat lines do change when filtereing by only year. So somehow it is only doing a cumulatative amount for the most current period is my guess. See images
Picture2.pngPic 1.png

1 ACCEPTED SOLUTION

I was able to get one chart like how you have it but when I try to do the accumulation, it just doesnt work. I ended up doing it in excel since power BI would not do it. Thanks for your help!

View solution in original post

5 REPLIES 5
v-echaithra
Community Support
Community Support

Hi @MercedesL ,

We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @MercedesL ,

We would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

 

Regards,
Chaithra E.

v-echaithra
Community Support
Community Support

Hi @MercedesL ,

If the provided answer was helpful, please mark it as "Accept as solution" and click "Yes" if you found it helpful, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

 

Regards,
Chaithra.

 

Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please try using visual calculation feature for getting running sum (cumulative sum).

 

Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn

 

And, please  try having dimension tables like the below image.
Please check the below image and the attached pbix file.

 

Jihwan_Kim_2-1746156619610.png

 

 

Jihwan_Kim_0-1746156540052.png

 

Jihwan_Kim_1-1746156608355.png

 

 

 


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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

I was able to get one chart like how you have it but when I try to do the accumulation, it just doesnt work. I ended up doing it in excel since power BI would not do it. Thanks for your help!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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