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
echristoph
Helper I
Helper I

SUMX on a CALCULATETABLE - Filters not working as expected

I've been trying this for several days in different configurations: CALCULATE, SUMX, using EARLIER/EARLIEST, with and without variables, ALL and without ALL, but nothing works. I've searched dozens of forum answers and YouTube videos. It seems so simple; maybe someone here can tell me what I missed:

 

echristoph_0-1644423330655.png

The CA Running Totals should be :

  • 1272.40
  • 2030.5
  • 1584.3
  • 1576.3
  • 1636.6

...but they are not, and I am sad. Any help is greatly appreciated!!

1 ACCEPTED SOLUTION
echristoph
Helper I
Helper I

Solution was silly: had to set the CA Running Total field to Don't Summarize. Sorry for the bother!

View solution in original post

7 REPLIES 7
echristoph
Helper I
Helper I

Solution was silly: had to set the CA Running Total field to Don't Summarize. Sorry for the bother!

echristoph
Helper I
Helper I

If it helps here's a snapshot of part of the source data:

echristoph_0-1644429720074.png

What I need for each row is the total of all values with the same Control Account, Cost Set, Results, and a date <= to the Date.

ValtteriN
Super User
Super User

Hi,

Is there a reason why common RT patterns like (measure):

Var _date = MAX('Calendar'[Date]) return
CALCULATE(SUM(Cap[Value]),ALL('Calendar'),'Calendar'[Date]<_date)

For column:

RT =
CALCULATE(Sum(Cumulativetotal[Value]),

ALL('Cumulativetotal'),Cumulativetotal[Date]<=EARLIER(Cumulativetotal[Date]))


Don't work here?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Tried it that way just in case I missed something; no luck:

echristoph_0-1644504463349.png

 

The Cost Set, Control Account, and Results columns all have multiple values that must be filtered before summing the total value for that row.

goncalogeraldes
Super User
Super User

Hello there @echristoph ! Can you check if this works for you?

 

CA Running Total =
VAR CurDate = [Date]
RETURN
    CALCULATE (
        SUMX (
            FILTER (
                SUMMARIZE (
                    ALL ( CAP ),
                    CAP[Control Account],
                    CAP[Cost Set],
                    CAP[Results],
                    CAP[Date],
                    "Sum", SUM ( [Your_sum_field] )
                ),
                CAP[Date] <= CurDate
            ),
            [Sum]
        )
    )

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

Looked promising, but no luck:

echristoph_0-1644428635687.png

 

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.