Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Alternate State Expressions taking Default State Selections

I am using Alternate States in order to create dynamic week over week comparisons, by creating an alternate state for two different week selections.  I would love if I could also have my expressions take field selections that occur in the default state, and I know I can use a syntax similar to the following to accomplish this:

Sum({OldWeek <Inventory_Type= $::Inventory_Type>} Inv_Total_Cost)

Is there any other way of accomplishing this, without listing every field in the default state in the chart expression like this?  I am picturing a solution with field selection trigger that copy over selections to the two alternate states, but this seems clunky as well.  I have dozens of fields that I would want to filter my alternate state expressions on, so I am hoping for a more elegant solutions that doesn't blow up my chart expressions into 100's of lines each.

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

How about this? This will honor selections in all fields from OldWeek and $...

Sum({OldWeek*$} Inv_Total_Cost)

if you want to ignore some from inherited state... you can do this

Sum({OldWeek*$<Field1, Field2, Field3>} Inv_Total_Cost)

View solution in original post

2 Replies
sunny_talwar

How about this? This will honor selections in all fields from OldWeek and $...

Sum({OldWeek*$} Inv_Total_Cost)

if you want to ignore some from inherited state... you can do this

Sum({OldWeek*$<Field1, Field2, Field3>} Inv_Total_Cost)

Anonymous
Not applicable
Author

This is exactly what I was looking for, Thank You so much!