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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Fernando_PBI
Regular Visitor

How to stop cumulative values in graph/table after no more data?

Hi,

 

I used the New quick measure assitant to get a cumulative view of data, I was able to achieve somehwhat the result I was looking for, however, the line chart/table shows the total in the following months where there is no data.

 

For example, 1246 in Nov 2019 should be 0 by Dec 2019 given that there's no more information for the latter.

How can I stop this from happening?

 

Fernando_PBI_0-1691600427280.png

 

The generated DAX code from the New Quick Measure assitant is the following:

 

Qty running total in Month =
CALCULATE(
    SUM('Table'[Qty]),
    FILTER(
        CALCULATETABLE(
            SUMMARIZE(
                'Sort Order Table',
                'Sort Order Table'[Month Number],
                'Sort Order Table'[Month]
            ),
            ALLSELECTED('Sort Order Table')
        ),
        ISONORAFTER(
            'Sort Order Table'[Month Number], MAX('Sort Order Table'[Month Number]), DESC,
            'Sort Order Table'[Month], MAX('Sort Order Table'[Month]), DESC
        )
    )
)
 

Thank you in advance!

1 REPLY 1
amitchandak
Super User
Super User

@Fernando_PBI ,

With help from date table

 

If(not(isblank(SUM('Table'[Qty]))) , CALCULATE(SUM('Table'[Qty]),filter(allselected(date),date[date] <=max(date[Date]))) , blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.