3 Replies Latest reply on Jul 2, 2015 3:46 AM by Quentin JUILLET

calculating delta values

Hi there,

I am trying to calculate delta values off min/max/aggregate values. Here's the dataset...

 report_type report_month net_sales new_net_sales actual 01-Jan-13 \$100,000.00 \$99,000.00 actual 01-Feb-13 \$150,000.00 \$147,000.00 actual 01-Mar-13 \$200,000.00 \$147,000.00 actual 01-Apr-13 \$225,000.00 \$224,000.00 forecast 01-Jan-13 \$250,000.00 \$217,500.00 forecast 01-Feb-13 \$300,000.00 \$247,000.00 forecast 01-Mar-13 \$350,000.00 \$339,500.00 forecast 01-Apr-13 \$200,000.00 \$189,000.00

and here's what i'm trying to do...

 actual forecast delta start_net_sales 100,000 250,000 -150,000 net_sales 450,000 900,000 -450,000 new_net_sales 393,000 804,000 -411,000

any help is appreciated.

thanks,

greg

• 1. Re: calculating delta values

Hi Greg,

I have reattached your workbook with a couple of new calculated fields. A table calculation needs to be created on top of the other calcs.

Hope this helps!

-Tracy

• 2. Re: calculating delta values

Hi Tracy,

When I try to apply the formula in difference between net (copy)  within a different dataset:

ZN(([net_sales ])) - LOOKUP(ZN(([net_sales ])), 1)

I get the following error :

All fields must be aggregate or constant when using table calculation functions or fields from multiple data sources.

Any ideas?

thanks,

greg

• 3. Re: calculating delta values

We have a similar problem here: Calculated field from 2 data sources: GA and local data

Does anybody know if it's possible to bypass this error when using calculated fields across several data sources?

Unless we join the data manually before importing it in Tableau, we can't find a way to do this. And in this case Tableau becomes pretty useless...