Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Labels with Alternate States

Hello,

I have 2 Alternate States setup they're called "A" and "B"


Each Alternate State has it's own Year, Quarter and Month.

I've been trying to display the current selections in the caption by using

"  =GetCurrentSelections(Year)  "
This displays the current selection for Alternate State "A",

Then I tried to use set analysis to display Alternate State "B"

"  =GetFieldSelections({<Year={B::Year}>})  "

This doesen't work, I'd like to find a way to display the current selections for Year, Quarter and Month, for each state.

Without displaying a Null Value or a Max/Min value if a Quarter or Month is not selected.

Thank you,

Ben

1 Solution

Accepted Solutions

Re: Labels with Alternate States

Hi,

    if(GetSelectedCount(Quarter) > 0, Max({A<Quarter= $::Quarter>}Quarter,' ') make sure that, alternate state is in "A"

Use inherited state as in straight table, and use expression like this,

sum({<Year = $::Year, Quarter = $::Quarter, Month = $::Month>} Sales)

sum({<Year = $::Year, Quarter = $::Quarter, Month = $::Month>} Sales)

as expression

Hope it helps

View solution in original post

6 Replies

Re: Labels with Alternate States

Hi,

Try this,

     =For A,Max({A<Year= $::Year>}Year)

     For B, Max({B<Year = $::Year>}Year)

A and B are alternate states

Hope it helps

Re: Labels with Alternate States

Are you using it in a text box?

Re: Labels with Alternate States

Hi,

     If your using differnt text objects then

Create 2 text objects 1 with alt state A and other with B then use the following expression in both

  =GetCurrentSelections(Year) 

Not applicable

Re: Labels with Alternate States

Mayil Vahanan Ramasamy -

Max and Maxstring works great, but when there's no Quarter or Month selected it shows me the max value, like Q4 or Dec.

For example if only the year 2012 is selected it displays 2012   Q4   Dec.

Celambarasan Adhimulam -

Thank you, I now understand that =GetCurrentSelections pulls it's Alternate State from the Object. The issue is, I have 2 Alternate states being displayed in 1 Straight Table. Any suggestions?

Thank you

Re: Labels with Alternate States

Hi,

    if(GetSelectedCount(Quarter) > 0, Max({A<Quarter= $::Quarter>}Quarter,' ') make sure that, alternate state is in "A"

Use inherited state as in straight table, and use expression like this,

sum({<Year = $::Year, Quarter = $::Quarter, Month = $::Month>} Sales)

sum({<Year = $::Year, Quarter = $::Quarter, Month = $::Month>} Sales)

as expression

Hope it helps

View solution in original post

Re: Labels with Alternate States

Hi,

     As of me getting the possible values can be done but getting fields selection is not possible for the alternate states.

     vote for the below idea

http://community.qlik.com/ideas/2340