Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have just learned about alternate states, and I'm pretty excited about them!
However, while searching for examples on using them in expressions, I've come across some sort of dollar-sign expansion that I don't understand.
In the Qlik help doc for Examples of Alternate States in Chart Expressions there is the following example :
count({State1<Year = $::Year, Month = $::Month>} DISTINCT [Invoice Number])
What does the Year = $::Year and Month = $::Month bit mean ?
Second question, I've seen the StateName() function, are there any other alternative state specific functions ? I haven't seen any others, but it seems strange that isn't somethat that allows access the values of the alternative state...?
Thanks for any help, idea, useful links!
The documentation actually explains your first question...
"The QlikView Developer will keep the Year and Month selections in State1 and State2 synchronized with the Year and Month selections in the default state."
Using $::Year means passing the selection that exists in the default state.
For your second question, I'm not familiar with any other state-specific functions. Standard functions can be used to get state information, e.g. GetCurrentselections() will take a state parameter as detailed in the documentation:
This is the QS documentation but the same syntax works in QV, though it seems they haven't updated the documentation to reflect this.
The documentation actually explains your first question...
"The QlikView Developer will keep the Year and Month selections in State1 and State2 synchronized with the Year and Month selections in the default state."
Using $::Year means passing the selection that exists in the default state.
For your second question, I'm not familiar with any other state-specific functions. Standard functions can be used to get state information, e.g. GetCurrentselections() will take a state parameter as detailed in the documentation:
This is the QS documentation but the same syntax works in QV, though it seems they haven't updated the documentation to reflect this.