Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I would like to use a variable in set analysis, like this way…
I have defined this variable in the data load editor
SET vPlanRevenue = (Sum(if(Plan.IsU = '1', Plan.costs)));
it works fine. If I use it in e.g. a textbox or table like this
$(vPlanRevenue)
it shows the revenue depending on the selected fiscal years (which is perfect).
But, if I would like to use it in a set analysis like this
(I would like to show the revenue of e.g. 2018, independent of selected filter)
Sum({1<FiscalYear={2018}>} $( vPlanRevenue))
it is not working.
Should it work, or I am completely on the wrong way?
Is there another way to show the revenue of 2018 with the vPlanRevenue variable?
I need the variable in further calculations, so I cant remove the sum().
Any help is appreciated.
you can not use nested aggregations..
rather change the base variable as
Sum({<Plan.IsU = {1}, FiscalYear={2018}>}Plan.costs)
you can not use nested aggregations..
rather change the base variable as
Sum({<Plan.IsU = {1}, FiscalYear={2018}>}Plan.costs)
or
Sum({<Plan.IsU = {1}, FiscalYear={$1}>}Plan.costs)
in the expressions you can use it as
$(vPlanRevenue(2018))