Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a simple expression where the dimension is YEAR. For the year 2010, my expression gives me the incorrect total (this is because the source data is incorrect and I cannot change it) so for 2010 I need to add an extra 4 to the count - how can I do this?
Sum({1<StatusFlagID={'*1*'}, IncidentType={'*Accident*'}, ListTitle={'*Employee*'}>}StatusFlagID)
Thanks
You need to use either
rangesum(sum(....), if(YEAR=2010,4))
or
sum(....) + if(YEAR=2010,4,0)
if(YEAR=2010,4) will return NULL for all YEAR <> 2010, and adding NULL to something returns NULL (rangesum will handle this gracefully).
Hope this helps,
Stefan
Hi,
If you have data inconsistency, I would very much recommend you to fix it in the script and not in the object expression. Not even in the front-end application script but on a previous transformation level of QVWs.
However, you can add it like this:
SUM(...) + IF(YEAR=2010, 4)
that doesn't seem to be working..any ideas?
You need to use either
rangesum(sum(....), if(YEAR=2010,4))
or
sum(....) + if(YEAR=2010,4,0)
if(YEAR=2010,4) will return NULL for all YEAR <> 2010, and adding NULL to something returns NULL (rangesum will handle this gracefully).
Hope this helps,
Stefan