Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
leenlart
Creator
Creator

Using Alternate states in expressions

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!

 

1 Solution

Accepted Solutions
Or
Master
Master

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:

https://help.qlik.com/en-US/sense/February2021/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Field...

This is the QS documentation but the same syntax works in QV, though it seems they haven't updated the documentation to reflect this.

View solution in original post

1 Reply
Or
Master
Master

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:

https://help.qlik.com/en-US/sense/February2021/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Field...

This is the QS documentation but the same syntax works in QV, though it seems they haven't updated the documentation to reflect this.

View solution in original post