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! Request now

Reply
vtechBI
Helper I
Helper I

I need help with DAX query to SUM the Amount of different category

I need help with DAX query to SUM the Amount 

Where Purchase Type = Online

And

Where Purchase Type = Shop

 

vtechBI_1-1702904023532.png

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

pls try this'

m1 = CALCULATE(SUM('table'[Amount]), 'table'Purchase Type = "Online")
m2 = CALCULATE(SUM('table'[Amount]), 'table'Purchase Type = "Shop")

View solution in original post

5 REPLIES 5
Ritaf1983
Super User
Super User

Hi @vtechBI 
If I understood correctly your request, the formula :
_Sum = calculate (Sum('yourtable[amount], 'yortable'[Purchase Type] = "Online" ||  'yortable'[Purchase Type]="Shop"

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ahmedx
Super User
Super User

pls try this'

m1 = CALCULATE(SUM('table'[Amount]), 'table'Purchase Type = "Online")
m2 = CALCULATE(SUM('table'[Amount]), 'table'Purchase Type = "Shop")

It worked..thanks.

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.

miTutorials
Super User
Super User

Please try the below measure.

 

Sales = CALCULATE(SUM(Sales), Purchase Type = "Online" || Purchase Type = "Shop")

 

Best regards,

Ismail | MiTutorials

MiTutorials on YouTube

Explore over 200+ Power BI tutorials and enhance your skills!

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.

Top Solution Authors