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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Andregewehr
Helper I
Helper I

Wrong accumulated values total sum

I have the following table with a accumulate value measure:

 

_accumulate_value =SUMX(VALUES('Table'[date]),
CALCULATE(sum('Table'[value]),FILTER(ALL('Table'[date]),[date]>=MAX('Table'[date]))))

 

id_productdatesellsvalue_accumulate_value
110/07/202251010
109/07/2022101020
108/07/202261030
107/07/202210636
106/07/20220036
105/07/20220238
104/07/202281048
103/07/202211058
102/07/202261068
101/07/2022101078
  5678422

 

But the total for accumulate_value is returning wrong in power bi

Andregewehr_0-1657806595867.png

 

How can i fix it to get the total sum 422 instead of 100?

 

1 ACCEPTED SOLUTION
AntonioM
Solution Sage
Solution Sage

You could create one more measure

Measure = 
IF(
    HASONEVALUE('Table'[date]),
    [_accumulate_value],
    SUMX(
        VALUES('Table'[date]),
        [_accumulate_value]
    )
)

which gives you 422

AntonioM_0-1657808431545.png

 

View solution in original post

4 REPLIES 4
AntonioM
Solution Sage
Solution Sage

You could create one more measure

Measure = 
IF(
    HASONEVALUE('Table'[date]),
    [_accumulate_value],
    SUMX(
        VALUES('Table'[date]),
        [_accumulate_value]
    )
)

which gives you 422

AntonioM_0-1657808431545.png

 

Perfect! Thanks!

Jihwan_Kim
Super User
Super User

Hi,

Please try the below measures and the attached pbix file.

both of them should work.

 

_accumulate_value V2 =
SUMX (
    VALUES ( 'Table'[date] ),
    CALCULATE (
        CALCULATE (
            SUM ( 'Table'[value] ),
            FILTER ( ALL ( 'Table'[date] ), 'Table'[date] >= MAX ( 'Table'[date] ) )
        )
    )
)

 

 

_accumulate_value = 
SUMX (
    VALUES ( 'Table'[date] ),
    CALCULATE (
        SUMX (
            VALUES ( 'Table'[date] ),
            CALCULATE (
                SUM ( 'Table'[value] ),
                FILTER ( ALL ( 'Table'[date] ), [date] >= MAX ( 'Table'[date] ) )
            )
        )
    )
)

 


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.
amitchandak
Super User
Super User

@Andregewehr , use allselected

 

_accumulate_value =SUMX(VALUES('Table'[date]),
CALCULATE(sum('Table'[value]),FILTER(allselected ('Table'[date]),[date]>=MAX('Table'[date]))))

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.