Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I'm having a little trouble selecting multiple items in a listbox. The listbox content is based on the script:
Comparison:
Load * Inline [
comp_ID, comp_Name
1, Turnover
2, Margin
3, Tickets
];
The graphs that I have on my dashboard are then built conditionally through an expression. There's one expression for each item in Comparison:
if(match(getFieldSelections(comp_Name), 'Turnover'), Sum(DocTotal))
This seems to work if an individual item is selected. However if I select more than 1 item. I receive a message that there is no data to display.
If I remove the IF clause and just look at the sums, all 3 are combined perfectly, so the data is there. What may be causing this behaviour?
You could try to use wildmatch() instead of match()
if(wildmatch(getFieldSelections(comp_Name), '*Turnover*'), Sum(DocTotal))
See: wildmatch - script and chart function
change getfieldselections functions to concat(comp_Name,' ')
getfield selection might return 'x of y values' when too many values are selected. concat is more reliable
Hi
Thanks for your reply, but if I replace getFieldSelections by Concat, I can't even build the graph using 1 selection. Now it seems as if there is no data at all.
Arne
You could try to use wildmatch() instead of match()
if(wildmatch(getFieldSelections(comp_Name), '*Turnover*'), Sum(DocTotal))
See: wildmatch - script and chart function
Arne, did Vegar's last post get you any further, or are you still working upon things? If his post did help, consider using the Accept as Solution button on that post to give him credit. If you have figured something else out, consider posting what you did and then mark that post. If you are still trying to work things out, leave an update on where you are with things, and we'll see if anyone else has any further ideas.
The only other thing I have for you would be to search around in the Design Blog area, there are a lot of great how-to posts there, not sure what you need here, so I am not going to try to pick any for you, I will let you search on your own, but I am betting you can likely find something that may help you here.
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
Regards,
Brett