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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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