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

data modeling problem

i want to calculate the sales(subtotals) for top 5 product names but give me the same result 

Mahmoud_Nasser_0-1646591764428.pngMahmoud_Nasser_1-1646591777811.png

 

6 REPLIES 6
MattAllington
Community Champion
Community Champion

My guess is the sales amount is correct, but who knows. You should try both totals in a card with nothing else. 

you could also use. CALCULATE(SUM(OrderHeader[SubTotal]),OrderDetail)



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

I made what you said but give me a different result and applied your equation on the table and give me a different result  doesn't equal the total 

Mahmoud_Nasser_0-1646596258275.png

 

MattAllington
Community Champion
Community Champion

Use OrderDetail[SalesAmount] instead of sub total. You can only fi,ter/summarise data by following the arrows in the model. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Thanks, Matt 

i measured it by [salesamount] but doesn't give me the same result 

for example total [subtotals] = 115 M  but total [sales amount] = 98 M 

The formulas add the totals. You need to understand your data better. Pick one invoice and investigate 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

okay, I will do 

Thanks for help matt 

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