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

Top Solution Authors
Top Kudoed Authors