Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I'm new in Qlik Sense. I have a field with an object type consisting of three values. I am making a kpi and I want that when the filter of an object is selected, the proportion is considered only within the framework of this type. It works with one type, but when you select two values it doesn't work.
=Sum([Sales])/IF(GetFieldSelections([Type])='Milk', sum(18000),
IF(GetFieldSelections([Type])='Water', sum(25000),
IF(GetFieldSelections([Type])='Meat', sum(105),
IF(GetFieldSelections([Type])='Milk' and GetFieldSelections([Type])=''Water', sum(43000),
IF(GetFieldSelections([Type])='Milk' and GetFieldSelections([Type])='Meat', sum(18105),
IF(GetFieldSelections([Type])='Meat' and GetFieldSelections([Type])='Water', sum(25105), SUM(43105)))))))
e.g.
WildMatch(GetFieldSelections([Type]),'*Milk*)
should work, I think. I might have the two parameters in the wrong order...
GetFieldSelections() gives you the field selections, concatenated, as stated in the official help site..
You can use Match() or WildMatch() to match your string to the concatenated selection, instead of trying a direct comparison like you did.
Thank you for answers, I'll try to figure it out, but don't know the syntax yet
e.g.
WildMatch(GetFieldSelections([Type]),'*Milk*)
should work, I think. I might have the two parameters in the wrong order...
Thank you!