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: 
Not applicable

Alternate state : is it possible to synchronize two (non default) state ?

Hi,

I'm working with two alternate states,

I need to make common selections on several fields, so I want to synchronize these two states.

the following syntax works to synchronize a state with the default one ($) :

count({State1<Year = $::Year, Month = $::Month>} DISTINCT [Invoice Number])

But is it possible to synchronize two states (without impacting the $ one) ?

Best regards

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Then try with this

     count({State1<Year =P({State2} Year), Month = P({State2} Month )>} DISTINCT [Invoice Number])

     Or

     you can go with this

     count({State1<Year =State2::Year, Month = State2::Month>} DISTINCT [Invoice Number])

Hope it helps

Celambarasan

View solution in original post

3 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     You can do it by using following expression

     count({[Alternate State1]+[Alternate state2]} DISTINCT [Invoice Number])

     Here + is union operation between 2 states it takes .if u need the common between 2 then use ( * ) instead of ( + )

Hope it helps

Celambarasan

Not applicable
Author

Thanks for your answer,

but my problem is more specific :

I need to synchronize selections upon 5 fields between the 2 alternate states, but other fields have to stay independant.

Best regards

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Then try with this

     count({State1<Year =P({State2} Year), Month = P({State2} Month )>} DISTINCT [Invoice Number])

     Or

     you can go with this

     count({State1<Year =State2::Year, Month = State2::Month>} DISTINCT [Invoice Number])

Hope it helps

Celambarasan