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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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