Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Have a requirement is that,
expression:
Sum{$<[Group]={'*'}-{'I'}>}(Sales)
As per the above expression, we are getting sum(sales) where Group I were excluded.
But the issue is that null values were not getting included.
I want to exlude Group I and include null as well.
Is there a way using set analysis.
=Sum{$<[Group]={'*'}-{'I'}>}(Sales) + Sum{1-<[Group]={'*'}>}(Sales)
Sum{1-<[Group]={'*'}>}(Sales) - This gives sum of sales where Group is null
Thanks for your reply.
But my issue is that, i want to exclude Group I.
But as per the set analysis it is excluding I as well as null values. because null it will not take as characters.
I want even null values + exclude Group I
So you want to exclude Nulls and 'I' from Group?
No Include null and exclude I
You may try capturing the NULL at script and mark them as 'NA' for your dimension field. Then it will be easy to use it in Set analysis
Sum({$<Group={'*'}-{'I'}>}Sales) -- Sum of Sales after excluding only Group I (Nulls are included)
Sum({$<Group={'*'}-{'I'}>}Sales) - Sum({1-<[Group]={'*'}>}Sales) -- Sum of Sales after excluding where Group is I or Null
Sum({$<Group={'*'}-{'I'}>}Sales) it is excluding both I and null values.
Checked already.
Hi,
why don't you use two expressions:
Sum({<Group=>}Sales) - Sum({<Group={'I'}>}Sales)
Set this in the script
Set NullInterpret = '';
Then try this
=Sum{$<[Group]={'*'}-{'I'}>}(Sales) + Sum{1-<[Group]={'*'}>}(Sales)