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

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.

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

Super User
Super User

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

You are welcome.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 106 members 1,387 guests
Please welcome our newest community members: