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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
CarlsBerg999
Helper V
Helper V

SUM a calculated table

Hi,

 

I'm having difficulties summing up the following table:


MyTable  =

FILTER(
    CALCULATETABLE(
        VALUES('Table'[Value (€)]),
        USERELATIONSHIP(DateTable[Date],'Table'[Start Date])),
                ISEMPTY(CALCULATETABLE('Table',
                'Table'[Attribute mod.]="Quote requested",
                USERELATIONSHIP(DateTable[Date],'Table'[Start Date]))))

The end result is a single column table with Value €. However, just wrapping this up in "SUMX(MyTable, SUM('Table'[Value (€)])" will provide an incorrect value, where the filters are not applied. 

I want to sum the values returned by "MyTable" -formula above. Ideas?
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@CarlsBerg999 So this doesn't work?

MyTable  =

VAR __Table =
FILTER(
    CALCULATETABLE(
        VALUES('Table'[Value (€)]),
        USERELATIONSHIP(DateTable[Date],'Table'[Start Date])),
                ISEMPTY(CALCULATETABLE('Table',
                'Table'[Attribute mod.]="Quote requested",
                USERELATIONSHIP(DateTable[Date],'Table'[Start Date]))))

VAR __Result = SUMX(__Table,[Value (€)])
RETURN
__Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@CarlsBerg999 So this doesn't work?

MyTable  =

VAR __Table =
FILTER(
    CALCULATETABLE(
        VALUES('Table'[Value (€)]),
        USERELATIONSHIP(DateTable[Date],'Table'[Start Date])),
                ISEMPTY(CALCULATETABLE('Table',
                'Table'[Attribute mod.]="Quote requested",
                USERELATIONSHIP(DateTable[Date],'Table'[Start Date]))))

VAR __Result = SUMX(__Table,[Value (€)])
RETURN
__Result


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Unfortunately this only works in a visual where there are ID's for each row. The summarizing of these does not add up correctly. I'm not quite sure if report level filters are causing this. 


Edit:
--> Answer to this was yes. Report level filters were the root cause. VALUES() -part of the formula was returning an incorrect value for the filter context. Thanks for the help!

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.