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
rajasekar_o
Helper V
Helper V

Total sales showing wrong

hi team,
i have calculate sales value after converting tha value in to some persentage 

rajasekar_o_0-1729057492676.png

eache sales value is diffrent branches.

calculation 
sales=[salesamount]-sales return amount]
convertion =sum(convert[salconv])
sales net=[salesamount]-sales return amount])*[convertion]

total sales net need to show =236355464

 

2 REPLIES 2
Anonymous
Not applicable

Hi, @rajasekar_o 

 

Can you explain what calculations led to your desired output?

vzhangtinmsft_0-1729150814387.pngvzhangtinmsft_1-1729150844521.png

The sum of Sales net is not 236355464.

 

Best Regards,

Community Support Team _Charlotte

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

Ritaf1983
Super User
Super User

Hi @rajasekar_o 

The issue you're experiencing with calculating sales values is due to how Power BI handles totals. By default, Power BI applies contextual logic for totals, which means it does not simply sum the individual rows you see. Instead, it removes the visual-level filters and recalculates the total based on that broader context, which can lead to discrepancies.

Alternative Solution Using `SUMX`:

To overcome this, you can rewrite your measure using `SUMX`. This function iterates over each row in a table, allowing you to control the calculation for each row and then sum those values to get the correct total. Here’s how you could modify your calculation:

DAX
Sales Net = SUMX(
SalesTable,
([SalesAmount] - [SalesReturnAmount]) * [Conversion]
)
```

In this example, `SUMX` will handle each row individually, performing the calculation and ensuring that your total is accurate, reflecting the sum of the row-level results rather than recalculating without the filters.

**Helpful Video Resources:**
For a more in-depth explanation, you might find these videos helpful:
https://www.youtube.com/watch?v=J2FTRqrx0m0&t=2s

https://www.youtube.com/watch?v=6rgAkejrup8&t=13s ( a little long , but very recommended)

For more specific suggestions 

you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

 

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

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