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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

SUMX in case of filter conditions

Hi All, 
This time I have dificulties to create a Measure of  SUM of SAP_JAN[In co. code currency] in following case (filtrations)
SAP_JAN[Account] = Admin[Account Number] = Category List[Category Level 1] = "Material cost (indirect & claims)"

Below you can find model 

koooala_0-1617304888833.png

 

and DAX formula i have tried to implemend 

koooala_2-1617305651057.png

 

Thank you in advance for you reply. 

 

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

I think you're making it a bit more complicated than it needs to be, but the main problem is the SELECTEDVALUE inside the FILTER makes the equality true for every row in the table you're filtering. Try removing that SELECTEDVALUE or go with something simpler like this:

Material cost (indirect & claims ) =
IF (
    SELECTEDVALUE ( 'Category List'[Category Level 1] ) = "Material cost (indirect & claims)",
    SUM ( SAP_JAN[In co. code currency] ),
    " "
)

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

I think you're making it a bit more complicated than it needs to be, but the main problem is the SELECTEDVALUE inside the FILTER makes the equality true for every row in the table you're filtering. Try removing that SELECTEDVALUE or go with something simpler like this:

Material cost (indirect & claims ) =
IF (
    SELECTEDVALUE ( 'Category List'[Category Level 1] ) = "Material cost (indirect & claims)",
    SUM ( SAP_JAN[In co. code currency] ),
    " "
)

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.