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

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

Reply
Anonymous
Not applicable

DAX for measure -Sum with condition

Hi PBI experts

I am unable to write DAX for below scenario. 

In given Data  table, measure to find out sum of qty where  at least one of Com typ is C for each ID

CompanyCom typPIDidQty.
Aothers128155285
CC1281552160
Aothers128155280
CC238299060
AOthers238299140
BOthers338299145
BOthers3223812138
CC322381232

 

Result- 555

Thanks 

3 REPLIES 3
Radhika2605
Helper II
Helper II

@amitchandak Sorry to tag you like that but saw your replies on various queries so thought you might be the right person. Any ideas about this one?

 

Thanks

Radhika

Anonymous
Not applicable

@Radhika2605 

Thanks for reply but this DAX will filter C and  sum of only those qty

 

 I need sum of all the rows (Qty) for IDs which have com typ as C. In above data except ID 382991 all others have C so, result as 555. 

 

Radhika2605
Helper II
Helper II

Hi @Anonymous,

 

You can use the following DAX function - 

Sum Of Quantity = CALCULATE( SUM ('Table'[Qty]), FILTER ('Table', 'Table'[Com typ]) = 'C' )

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks

Radhika

 

 

Helpful resources

Announcements
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.