cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anikah Regular Visitor
Regular Visitor

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.

 

Screenshot.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: How to find differences between sales value based on product type column and category column

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Super User
Super User

Re: How to find differences between sales value based on product type column and category column

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Highlighted
anikah Regular Visitor
Regular Visitor

Re: How to find differences between sales value based on product type column and category column

Thanks for the response Ashish...

Super User
Super User

Re: How to find differences between sales value based on product type column and category column

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 45 members 868 guests
Please welcome our newest community members: