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 IV
Super User IV

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 IV
Super User IV

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

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...

Highlighted
Super User IV
Super User IV

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
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors