Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Community,
as i am understanding set analysis correctly
Sum({1<DIM>}KPI) should give the same result (if nothing is selected of DIM) like Sum({$<DIM=P()>}KPI)
But Sum({$<DIM=P()>}KPI) shows not the same number, its only nearly (95%) the same as Sum({1<DIM>}KPI) !
Why is this happening, where is my mistake?
This may avoid nulls in first expression, not sure though..
Sum({1<DIM={"*"}>}KPI)
Yes this avoids nulls (2=1), but what if i need the opposite so that 2) should include the nulls (1=2)
See this sample -
Set NULLINTERPRET = '';
load * inline [
DIM,KPI
1,100
,100
3,100
4,100 ]
Not the perfect way but 2nd expression regards the selections and includes null as well.
ok, but is there no possibility to do this with set analysis? Set analysis seems powerfull, maybe there is a way to include also null values with P()
I think this works.
=Sum({1<DIM=p(DIM)>+1-<DIM=e(DIM)>}KPI)
However, there should be a neater solution; wait for someone to come up with.
Vow! this works, couldn't understand the use of '+1' here, can you pl help! Thanks
'+' is OR/Union operator here.
1-<DIM=e(DIM)> - excludes the excluded values (anyway they are included in the first part of union) but includes NULL.
So, the first part is with all non-null values and the second part of union includes NULL. Hope this helps.
Thanks! Didn't know we can use whole set '1' like this as well.
Hi tresco, good idea, but this works only if nothing is selected, when selecting something of DIM the result will be wrong. Null values are only interesting if nothing is selected. If selected only the selected is interesting.
With me it is working even with selection. Could you post a sample that demonstrates the issue?