Forum Discussion
Anonymous
7 years agoNot applicable
How to find differences between sales value based on product type column and category column
Hello,
I want to find sales value difference between the product and category.
for eg :
(product A and category 0) has $100 sales and the (product B and category 0) has $50 then the reult in difference coulmn would be 50. Screen shot below with yellowhighlighted column. Thanks in advance.
Hi,
Try this calculated column formula
=ABS([Sales]-CALCULATE(SUM([Sales],FILTER(Data,Data[Category]=EARLIER(Data[Category])&&Data[Product]<>EARLIER(Data[Product]))))
Hope this helps.
3 Replies
- Ashish_Mathur
Super User
Hi,
Try this calculated column formula
=ABS([Sales]-CALCULATE(SUM([Sales],FILTER(Data,Data[Category]=EARLIER(Data[Category])&&Data[Product]<>EARLIER(Data[Product]))))
Hope this helps.
- AnonymousNot applicable
Thanks for the response Ashish...
- Ashish_Mathur
Super User
You are welcome.