Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Could some one please explain what is the maximum number of values we can pass into a dimension in set analysis?
and could explain what went wrong at following.?
I am using this expression to get all the list of values over a dimension called SalesKey.
=concat(distinct Aggr(max(SalesKey),Buyer,CPO),chr(39)&','&chr(39))
out put : a list of values
but when i use the same expression in set analysis it gives the output as 0.
=Sum ( {< SalesKey = {'$(=concat(distinct Aggr(max(SalesKey),Buyer,CPO),chr(160)&','&chr(160)))'}>} SALES)
I believe its due to the quotes encoding the ',' .
Also try to save the concatenated result in a variable and pass the variable in set analysis , that makes it easier to understand and use.
Also check for valid values on the Sales Key passed in set analysis
You are missing starting and ending quotes. Try like:
= chr(39) & concat(distinct Aggr(max(SalesKey),Buyer,CPO),chr(39)&','&chr(39)) &chr(39)
Maybe try by using just max(SalesKey) without Aggr:
Sum ( {< SalesKey = {"=max(SalesKey)"}>} SALES)
hi Tresesco
can you pls explain how this chr() works here?
It's not about chr() as a function. But about understanding your concat() anf it's separator you are using. Your are using chr(39)&','&chr(39) as separator which is essentially - ',' . That means concat would return something like:
value1','value2','value3...','valuen
however, in set analysis modifiers the comparison values expected to be withing single quotes. For ex, <Country={'USA', 'UK', 'FRANCE'}>. Now you look at the returned by your concat() has all quotes for values except the first and last one, and that is because your expression. To fix the missing quotes, try using my expression.
I see your point. It might work without those quotes because your expression evaluation itself is enclosed by quotes.
There might be a limit in length (I am not sure though), but would not be anything less than hundred elements (if not more) I believe (I never tested though). How many values - in your case? Could you share a sample that shows the issue?
Hey guys, adding a Design Blog post on Set Analysis, not sure if it may provide some further clarity or not:
https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344
There are some other links in the post as well to other related posts. I check the Help as well, but I did not see anything related to limitations...
Regards,
Brett