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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. 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 is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.