Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
I have got the following aggr-function which returns the Sales for the best Sales representative:
max(aggr(sum(Sales),SalesRep))
Now I would like to replace the dimension value with an if statement:
max(aggr(sum(Sales),if(Variable=1,SalesRep,Region)))
Obviously that expression isn't valid. Do I miss something?
Regards,
Florian
Hi did u try
f(Variable=1,
max(aggr(sum(Sales),SalesRep)),
max(aggr(sum(Sales),Region)))
Replacing the if-Condition with a variable doesn't work either.
Please find the attached qvw.
Check the attached qvw.
Hope this helps you
Fernando
alfasierra, thanks for your suggestion, I agree.
But: I posted a rather simplified example to demonstrate the basic problem. In my real application I have several possible dimension values (such as SalesRep, Region ...) and some other if conditions. Plus, I'm using similar expressions in a couple of objects --> thus I would like to keep them as simple as possible.
I'm wondering why the if-condition doesn't work as supposed.
Regards, Florian
That works!! Thanks Fernando