Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I would like to accomplish 1 of 2 things in a Qlikview document:
1) On a chart I would like a Calculation Condition that find the number of MonthName items that are selected. And if there is at least 1 selection then it should display the chart. I have so far:
=Count(distinct[MonthName])>0
However this just reads what MonthName items are available with the other current selections, not what MonthName items are selected.
OR
2) I would like the opening Macro of the sheet to know find what MonthName items are selected. If none are selected, then to select "Jan" or all months that are available. If one MonthName is selected then to do nothing.
I hope somebody can help me with one of them
Thanks!
-Mike
1) =getSelectedCount(MonthName)
You shouldn't even need to say >0, because 0 is false, and anything else is true.
1) =getSelectedCount(MonthName)
You shouldn't even need to say >0, because 0 is false, and anything else is true.
Thanks John, that works! Anybody know how to do #2?
I think this (untested):
sub DefaultJan()
set field = ActiveDocument.getField("MonthName")
if field.getSelectedValues.Count < 1 then
field.select "Jan"
end if
end sub
Works great. Thanks again!