Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to build a dimension from aggr statement when in an alternate state.
my expression is
if(getselectedcount(myfield)>1,
if(wildmatch(fieldB,'*123*'),count distinct(ID2),count distinct(ID))
,count distinct(ID))
The idea is when myfield has more that one selection use a dimension that is the original list.
so the dimension would be:
if(getselectedcount(myfield)>1, aggr({$},myfield,myfield),myfield)
But I am having trouble switching to the original series when in an alternate state.
Thanks.
My solution so far is:
if(getselectedcount(Company)>1,
sum(distinct {$<Company = Company + {"*All"}>}DATA1),
Sum(DATA1))
This works and I have now hidden D-All with wildmatch, so sorry for posting this, I can just align my data source to use this formula
It's nice that you have got the solution. However, generally this should be handled by Generic keys which seems to be more viable.