2 Replies Latest reply on Mar 13, 2012 2:36 PM by geoff.clemm

# Applying different discounts to branches based on the size of a parent company

Hello-

I have a dataset that includes sales information to a number of child companies. Each child company falls under a parent company. In my dataset there are 1300 lines, each representing a different child company, all of which roll up to 100 parent company's, where the parent company is denoted in one of the fields in the data.

I would like to see what profit would have been by child company had I offered a discount based off of the size of their parent company. For example, if the parent company had total sales greater than \$100k I would have given them a 10% discount, if the parent company had sales greater than \$1MM I would have given them a 15% discount, etc.

When creating my calculated field, how do I apply different discounts to the individual child company's based off of the sum of sales to the parent company?

• ###### 1. Re: Applying different discounts to branches based on the size of a parent company

Hi Geoff,

Create a calculated field similar to the following:

if total(sum([Sales]))>=100000 then sum([Sales])*.10

elseif total(sum([Sales]))>=1000000 then sum([Sales])*.15 end

Place this on the view. Next, you'll have to change the way the calculation is being computed. Right click on it, select Compute Using-->Parent Company

Hope this helps!

-Tracy

1 of 1 people found this helpful
• ###### 2. Re: Applying different discounts to branches based on the size of a parent company

Tracy,

Thank you for your help! I have a follow up question that I would love your input on.

I would like to bin my child companies based on parent company size and compare price bands for the same product. For instance, I would like to plot price paid (dimension) against something like this:

if sum([Revenue]) > 1000 then "big customer"

else "small customer"

end

I noticed when I created this calculated field and dragged it to the X axis, Tableau marked it as an aggregate calculation. How do I get it to aggregate based on parent company?

Thank you!

Geoff