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
Alxnder
Frequent Visitor

sumx with multiple criteria

Hello, not sure why my sumx is not working. Not giving me an error but giving no data?

Trying to sum FDM, FEJ, FJH. All 3 criteria fall under the same column. 
Any help would be apprecaited!

Alxnder_0-1717958133962.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Alxnder ,

 

Thanks for the reply from @HotChilli .

 

There are some problems with your syntax. You should use || instead of &&, because Grade cannot be FDM, FEJ, and FJH at the same time.

 

Try this:

Fancy total = 
SUMX(
    FILTER('PackoutDetails',
    'PackoutDetails'[Grade] = "FDM" || 'PackoutDetails'[Grade] = "FEJ" || 'PackoutDetails'[Grade] = "FJH"
    ),
    'PackoutDetails'[Quantity]
)

 

The final page visual effect is as follows:

vhuijieymsft_0-1717998316314.png

 

I would be grateful if you could provide me with the pbix file or sample data.

 

Remember to remove sensitive data and do not log in to your account in Power BI Desktop when uploading the pbix file.

 

If you have any other questions please feel free to contact me.

 

The pbix file is attached.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

4 REPLIES 4
Alxnder
Frequent Visitor

@HotChilli -- will have to try that method as well, thanks for the advice. 

Alxnder
Frequent Visitor

@Anonymous  - Worked like charm, thanks for help.

Alxnder_0-1718129638460.png

 

Anonymous
Not applicable

Hi @Alxnder ,

 

Thanks for the reply from @HotChilli .

 

There are some problems with your syntax. You should use || instead of &&, because Grade cannot be FDM, FEJ, and FJH at the same time.

 

Try this:

Fancy total = 
SUMX(
    FILTER('PackoutDetails',
    'PackoutDetails'[Grade] = "FDM" || 'PackoutDetails'[Grade] = "FEJ" || 'PackoutDetails'[Grade] = "FJH"
    ),
    'PackoutDetails'[Quantity]
)

 

The final page visual effect is as follows:

vhuijieymsft_0-1717998316314.png

 

I would be grateful if you could provide me with the pbix file or sample data.

 

Remember to remove sensitive data and do not log in to your account in Power BI Desktop when uploading the pbix file.

 

If you have any other questions please feel free to contact me.

 

The pbix file is attached.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

HotChilli
Super User
Super User

The way you solve something like this is to use just the Filter part without SUMX and instead use COUNTROWS. Put that on a card visual.

See what value you get.

If you get blank, remove all the filter conditions except 1.  Then see if you get a value.  If you do, add one filter condition back in and see what happens.  If you get blank again, re-examine what the filter is doing.

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.