Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
MayilVahanan

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

6 Replies
MayilVahanan

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
CELAMBARASAN
Partner - Champion
Partner - Champion

Are you using it in a text box?

CELAMBARASAN
Partner - Champion
Partner - Champion

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
Author

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

MayilVahanan

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
CELAMBARASAN
Partner - Champion
Partner - Champion

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