Forum Discussion
Need help with calculation
I have this problem giving me gray hair.
So I have customer no, sales, cost and cost of sales %.
The cost of sales % is correct for each customer no, but the total is wrong.
I would like it to be total sales divided with total cost, but instead it´s summarized.
Also the green visualizations is summarized, and choosing avarage or median also gives me the wrong result.
4 Replies
- mh2587Super User
can you share your Dax ?
- amitchandakSuper User
Dhjlm , will measure like that help ?
divide(Sum(Table[Cost]), Sum(Table[Sales]) )
- DhjlmFrequent Visitor
Sorry, that didn´t help
- v-janeyg-msftCommunity Support
Hi, Dhjlm
From your screenshot, we can't see how the 'cost of sales %' is calculated? So can you explain it?
If it's a measure, you may need to modify it by using sum(summarize()) function to make the total correct.And it's better to share some sample data and your desired result. So we can help you soon.
Best Regards,
Community Support Team _ Janey