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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
brijesh1991
Partner - Specialist
Partner - Specialist

Alternate state: Mixing current selection and alternate state selection

Hi,

I had an expression like this which is working on current selection.

Count(Distinct{$<TableFlag={Application},[Month (#)]={$(=Max(Month))},Year={$(=num(Max(Year)))},FiscalYear=,FiscalQuarter=>}Application_Number))

I wanted to do branchwise comoparisn over this expression.

I took two list boxes and created two alternate states- state1 and state2.

How to apply alternate state as well as current selection in above scenario?

Thanks,

BRIJESH

Labels (1)
5 Replies
tresB
Champion III
Champion III

alexandros17
Partner - Champion III
Partner - Champion III

An expression may work on a state or on current selection, obviously you may use 2 or more expressions in a chart.

if you need your expreession to work with alternate state write:

Count(Distinct{$ state1 <TableFlag={Application},[Month (#)]={$(=Max(Month))},Year={$(=num(Max(Year)))},FiscalYear=,FiscalQuarter=>}Application_Number))


let me know

brijesh1991
Partner - Specialist
Partner - Specialist
Author

Hi Tresesco,

I had two list box; BranchName A and BranchName B-both of which are same;just their alternate state is different.

I had a bar chart which have month as dimention and two expressions-one for BranchName A listbox and second for BranchName B listbox.

When I select one branch from BranchName A and one from BranchName B, then bar chart should show two bars- one for expression one and second from expression 2.

How to write these two expression.

Count(Distinct{$<TableFlag={Application},[Month (#)]={$(=Max(Month))},Year={$(=num(Max(Year)))},FiscalYear=,FiscalQuarter=>}Application_Number))

brijesh1991
Partner - Specialist
Partner - Specialist
Author

Hi 

Thanks, but above expression doesn't work.

My requirement is like this:

I had two list box; BranchName A and BranchName B-both of which are same;just their alternate state is different.

 

I had a bar chart which have month as dimention and two expressions-one for BranchName A listbox and second for BranchName B listbox.

 

When I select one branch from BranchName A and one from BranchName B, then bar chart should show two bars- one for expression one and second from expression 2.

 

How to write these two expression.

Count(Distinct{$<TableFlag={Application},[Month (#)]={$(=Max(Month))},Year={$(=num(Max(Year)))},FiscalYear=,FiscalQuarter=>}Application_Number))

alexandros17
Partner - Champion III
Partner - Champion III

Here it is my example