cancel
Showing results for
Search instead for
Did you mean:
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.

1 ACCEPTED SOLUTION

Accepted Solutions
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/
3 REPLIES 3
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/
Regular Visitor

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

Thanks for the response Ashish...

Highlighted
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

#### New Ranks and Rank Icons in 2020

Read the announcement for more information!

#### New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

#### November 2019 Community Highlights

Get an overview of the events and great community content from November.

#### Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)