I have to calculate variance as follows with eg data.
Date vlues
10-oct 100 eg
18-oct 190
25-oct 500
28-oct 300
5-sept 900
10th-nov. 300
I took this date filed in Pivot table like this as a dimension and i have to add one field like varince and i took 1 in expression and i need script for calcaultion of varince between eg 5-sept and 10th nov
Date 10-oct 18-oct 25-oct 28-oct 5-sept 10th-nov. varince
100 190 500 300 900 300 -600(Expected value)
If your giving dynamic formula or static formula its help me.
I used the before function in the pivot table to calculate the variance.
You can also use above it you pivot the table or use a straight table. Search interchart functions to see how you can reference other values in a chart.
Another way is to use previous() or peek() in the load statement ordering the data by date.