Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to make a calculated dimension based on a value of a variable:
If the value of the variable is null or is not filled I want the normal field and if the variable as a value a want the calculated dimension:
I tried with this :
=if('$(Max)'='' or '$(Min)'='',field1,
if(aggr(sum(W_etc)/SUM(W_etc2),field1)>=$(Min)
and aggr(sum(W_etc)/SUM(W_etc2),field1)<=$(Max)
,field1)
)
What's wrong? Why I get an error if max or min are empty or null ?
Thanks in advance
Hi try removing '
=if($(Max)='' or $(Min)='',field1,
When the variable is null I get an error on the graph also withot '
ok, prueba asi:
=if(isnull($(Max)) or isnull($(Min)),field1,
I get: Error in calculated dimension ....
But if the varible are not null, it works, right?
Neither that solution ... I think the problem is not associated with the IF condition ... but with the field1 passed as dimension
Yes the variable condition works
so if you onlyu put this
if(aggr(sum(W_etc)/SUM(W_etc2),field1)>=$(Min)
and aggr(sum(W_etc)/SUM(W_etc2),field1)<=$(Max)
,field1)
and the variables are not null, it works?
Hi,
"Null" values are different to "Not Filled" vaules. You must consider both cases:
If (Max='' or Min='' or IsNull(Max) or IsNull(Min), field1....
Take in mind that this condition is only false when Max AND Min has a value...
Please, tell me if it works!!