Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a gauge I'm building, and I want it to display the number of WIndows OS in a table with multiple types of OS in it.
If I put the values in a Table Chart. I get this:
so my Wildmatch syntax ( =wildmatch(os, '*Wind*') ) returns true as expected for Windows.
When I put this into my Guage as an if statement it doesn't equate to true.
the syntax I'm using at the moment is =if(wildmatch(os, '*Wind*'), 10, 20). Seems like this should display 10, not 20. What fundamental thing am I missing here?
Hi, when you have a dimension each table row is checked agains the dimension value on that row, when setting the expression in a gaude, with differnt values for os, os will be null().
Maybe with: =if(wildmatch(Concat(distinct os,';'), '*Wind*'), 10, 20)
Hi, when you have a dimension each table row is checked agains the dimension value on that row, when setting the expression in a gaude, with differnt values for os, os will be null().
Maybe with: =if(wildmatch(Concat(distinct os,';'), '*Wind*'), 10, 20)
Worked like a champ, thank you. Any pointers on some documentation (or just search terms) for that behavior would be appreciated.
Hi, in general, if you ask for a field and that field has different values, it returns null, so different values needs to be in an aggregation function to return a unique value to compare. Aggregation funcions could be: Sum(), Avg(), Maxstring(), Concat()... something that expects different values and does an operation with all of them to return a unique value.
Perfect. Thanks again.
Another good explanation of the need to use an aggregation function is https://community.qlik.com/t5/Design/Use-Aggregation-Functions/ba-p/1475833
-Rob
That one's going in my favorites list.
Thanks
Ron