Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have a problem to calculate 'TOT_OT'
TOT_OT = NB_OT for dimension 'ALLER/RETOUR' = ALLER + RETOUR
It works for 'ALLER' but there is nothing for 'RETOUR'. Is it a bug ??
The formula is : aggr(Sum(if(OTSTYPE = 'OT',1,0)),DPT_NUM_DEP_ARR)
I aggregate the sum on DPT_NUM_DEP_ARR. Here is '14-59'
Why does it work perfectly for the first value 'ALLER' of the dimension 'ALLER/RETOUR' and not for the second one ??
hi
when using an aggr function , it disregards the dimensions in the table and only uses the dimensions in your function
so it will put the result only once in the other dimensions
you need to change the function to
aggr(nodistinct Sum(if(OTSTYPE = 'OT',1,0)),DPT_NUM_DEP_ARR)
this will put the same value in all fields
hi
when using an aggr function , it disregards the dimensions in the table and only uses the dimensions in your function
so it will put the result only once in the other dimensions
you need to change the function to
aggr(nodistinct Sum(if(OTSTYPE = 'OT',1,0)),DPT_NUM_DEP_ARR)
this will put the same value in all fields
You can also try this
Sum(TOTAL <DPT_NUM_DEP_ARR> {<OTSTYPE = {'OT'}>} 1)
Yes, it was the problem !! I have forced with nodistinct in the formula and it works perfectly !