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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
jimpatel
Post Patron
Post Patron

Sum of column depends on text

Hi,

 

Thanks a lot for looking at my post.

 

I am using below Dax formula but unfortunately i am not getting what i need. Any help will be much appreciated. 

 

Sum = CALCULATE(SUM('Order (2)'[Quantity]),FILTER('Order (2)',CONTAINS('Order (2)','Order (2)'[Name],"Name 1")||CONTAINS('Order (2)','Order (2)'[Name],"Name 3")||CONTAINS('Order (2)',' Order (2)'[Name],"Name 5")))

 

Any idea please?

Thanks a lot

jimpatel_0-1713178653642.png

 

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

Here is one way to do this:
Data:

ValtteriN_0-1713179259907.png

 

Measure 23 = CALCULATE(SUM('Table (32)'[Value]),'Table (32)'[Name] in {"Name1","Name3"})

End result:
ValtteriN_1-1713179278035.png

Only name1 and name3 are considered.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
jimpatel
Post Patron
Post Patron

Perfect

 

Thanks a lot for your input 

 

ValtteriN
Super User
Super User

Hi,

Here is one way to do this:
Data:

ValtteriN_0-1713179259907.png

 

Measure 23 = CALCULATE(SUM('Table (32)'[Value]),'Table (32)'[Name] in {"Name1","Name3"})

End result:
ValtteriN_1-1713179278035.png

Only name1 and name3 are considered.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.