10 Replies Latest reply on May 10, 2018 12:01 PM by Deepak Rai

Calculation Help

So here is an example of which I need some help. A, B and C are 3 products with impressions every month. The spend per month is fixed which is 7500. So the cost per product would be Fixed Cost/Total Impressions that month*Impression of that product. for example cost for A in Jan would be 7500/19000*5000 and cost for B in Jan would be 7500/19000*6000 .

How to calculate that in Tableau.

• 1. Re: Calculation Help

Hi,

1. Create a  calculated field which is Total=A+B+c

2.Create a calculated field Fixed cost - 7500 - aggreagation max

3. Now use your formula to calculate the costs - Fixed cost/Total*A

Regards,

Pavan

• 2. Re: Calculation Help

Hello Abhinav,

Here it is:

Attaching the .TWBX file aswell.

S

1 of 1 people found this helpful
• 3. Re: Calculation Help

Hi Sudheer, Thanks for your help. Actually the data is in this type of format. So, When then it becomes difficult to take a sum of all there products. So I want sum of A+B+C in january. How do i do that?

• 4. Re: Calculation Help

Can you attach a fake dataset and what you need?

Thanks

Deepak

• 5. Re: Calculation Help

Sure,

Here is the sample dataset and the .twbx file. So these numbers are the impressions per product for each month. The combined cost( A+B+C) is fixed for each month (i.e.7500). So need to calculate the cost for each product for each month which would be like for Product A in January would be 7500/(Impression A +Impression B+Impression C)* Impression A i.e 7500/44000*5000=852 and similarly for other products.

• 6. Re: Calculation Help

Here it is.

If it Helps, pl mark it Helpful and CORRECT to Close Thread

Thanks

Deepak

1 of 1 people found this helpful
• 7. Re: Calculation Help

Deepak,

Thank you so much. I have one follow up question. That does this level of detail expression works in case we have data from two different sources?

• 8. Re: Calculation Help

Yes , You need to join them on common field, Pl don't blend.

• 9. Re: Calculation Help

Sure! Thanks a lot

• 10. Re: Calculation Help

Welcome!!!