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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Cumulative Sum is not working as expected

Hi All,

        1.  I have written a mesure like below to get the cumulative sum

3.PNG

 

2. Its working as expected when no field is added in the columns section like below

 

2.PNG

 

3. But my requirement is to get the cumulative sum for all the plants in the 'Plant' filed. When i added it its not working like below.

I have values for 1511 and 1512 also but its showing values only for 1526. Please help on this. Thanks in advance.

 

1.PNG

 

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

Add a Date table to your model and connect it to 'F/Unrealeased_PO' table on date columns. Then use Year and Month columns from Date table into the matrix as Rows fields. Then use below measure. I create a sample pbix for your reference.

CumulativeTotal = 
VAR _date = MAX ( DimDate[Date] )
RETURN
    CALCULATE (
        SUM ( 'Table'[Total Purchase] ),
        ALL ( DimDate[Date] ),
        DimDate[Date] <= _date
    ) + 0

21112603.jpg

 

Best regards,

Jing

View solution in original post

4 REPLIES 4
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Try this measure.

CumulativeTotal =
VAR _date = MAX ( DimDate[Date] )
RETURN
    CALCULATE (
        SUM ( 'F/Unrealeased_PO'[OpenPODelValue_USD] ),
        ALL ( 'F/Unrealeased_PO'[PO Due Date] ),
        'F/Unrealeased_PO'[PO Due Date] <= _date
    ) + 0

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Anonymous
Not applicable

Hi @v-jingzhang thanks for your solution but still its not working for me. Can you please give any other solution.

Hi @Anonymous 

 

Add a Date table to your model and connect it to 'F/Unrealeased_PO' table on date columns. Then use Year and Month columns from Date table into the matrix as Rows fields. Then use below measure. I create a sample pbix for your reference.

CumulativeTotal = 
VAR _date = MAX ( DimDate[Date] )
RETURN
    CALCULATE (
        SUM ( 'Table'[Total Purchase] ),
        ALL ( DimDate[Date] ),
        DimDate[Date] <= _date
    ) + 0

21112603.jpg

 

Best regards,

Jing

Anonymous
Not applicable

Hey @v-jingzhang thank you very much for your solution. It's working as per my requirement. Thanks alot..

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors