Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
wynnjimbbt
Contributor III
Contributor III

Alternate State variable calls GetSelectedCount([_ROWS]) does not work

upgrading from QV11.2 SR7 to QV12.1 SR5

variables that call functions like GetSelectedCount([_ROWS]) do not calculate correctly within Alternate State. I cannot find the correct syntax to define the Alternate State in the Variable definition??

vClientFieldSelected:   below, how do I define the Alternate State = 'PortView_Model' ??

=If(GetSelectedCount([_ROWS]) > 0,1,0)

4 Replies
Nicole-Smith

You can specify which state to use in your GetSelectedCount() function like so:

=If(GetSelectedCount([_ROWS], False(), 'PortView_Model') > 0, 1, 0)

wynnjimbbt
Contributor III
Contributor III
Author

Thank you!

Jim Wynn

BB&T | Financial Technology Services

IT Systems Consultant

7701 Airport Center Drive

Greensboro, NC 27409

Jim.Wynn@bbandt.com

T: 336-455-9269 | C: 336-404-1221

wynnjimbbt
Contributor III
Contributor III
Author

Thanks Nicole!
That fixed my GetSelected variables


so I have:

vBeginMnth and vBaseMnth defined in the Dashboard load script

vBeginMonth is defined as =
If( [Report Month] = vBeginMnth , vBaseMnth, vBeginMnth

the if stmt works in a textbox but the variable vBeginMonth does not work correctly

can you help?

Nicole-Smith

I can't give you an exact answer without seeing what you're trying to do with it, but have you tried wrapping it in dollar sign expansion?

Dollar-sign expansion using a variable ‒ QlikView