Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a problem with qlikview.
I have a calendar that I can select multiple values for month. I need to know if when I have selected several months March is selected.
For example:
If ('March' IN selected-months, then condition)
I tried with Match function but this only works if you select only one month.
Any ideas?
Thanks!
use substringcount inside of a concat
if(SubStringCount(Concat('||' & 'Month, '||'), '||March||') >0 and GetSelectedCount(Month) > 0,
You may need to use Subfield function when you have multiple months. But the exact expression which can be used can only be determine once you share a sample data or application.
Best,
Sunny
Hi
In expression:
=If(WildMatch(GetFieldSelections(Month), '*March*'), 1, 0)
Flow control in script:
If WildMatch(GetFieldSelections(Month), '*March*') Then
HTH
Jonathan
Jonathan, it is not a script function...
use substringcount inside of a concat
if(SubStringCount(Concat('||' & 'Month, '||'), '||March||') >0 and GetSelectedCount(Month) > 0,
Try this,
if(SubStringCount(getfieldselections(urmonthfield),'March')>0, then condition)
considering you would want to do it in the front-end.
Thanks for all, I tried:
=substringcount(concat(DISTINCT Mes),'mar')
And it´s works perfectly
If (Index(GetFieldSelections(MonthField), 'March'), 'Present','Not')
Or
If (GetFieldSelections(MonthField) Like '*March*', 'Present','Not')
There is a difference between using concat() and GetFieldSelections(). If you use concat(), it would react on all available values, not just selected values - which is not the same. Your request was about the selected values, so concat() is not the right function for this requirement. Well, if it works for you - you know better what's really required.
Second, the correct answers was given by Jonathan (if use GetFfieldSelections) and by Ramon (if use concat). They deserve at least "helpful" points. Marking your own answer as correct is fine of course, especially if there were no other good answers, but it doesn't add you points anyway.