Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am having problems with calculated dimension.
I would like to calculate variance for different data versions as shown in really simple example below...
Dimension is Version and Expression definitions are in below.
So, how should I calculate the variance for Versions?
Expressions | Actual | Budget | Variance | |
---|---|---|---|---|
=sum({$<Version = {'Actual','Budget'}>}Sales) | Sales | 500 | 450 | 50 |
=sum({$<Version = {'Actual','Budget'}>}Costs) | Costs | 358 | 330 | 28 |
=((column(1)-Column(2))/Column(1) | Margin% | 28% | 27% | 2% |
Data model is like below:
Field | Data |
---|---|
Version | (Actual, Budget...) |
Sales | (values) |
Costs | (values) |
Hi,
Does anyone have any ideas?
It would also be helpful information to know if it can't be done so I could try something else...
Calculated dimensions don´t take functions like sum, avg, etc. They only allow ifs. Do your calculations on the script.
Also, I think some people are confusing variance and variation. They are two different things.
Ok.
Thanks.
I will try another approach.