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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
hkapadia
Contributor III
Contributor III

Alternate States

I have 2 multi boxes for 2 dates with alternate state for each.

When I select a date from the box, I want to show that date & the corresponding amount in the columns of a straight table. I'm able to show the amount using the expression sum({[Date1]} Amount) where Date1 is the name of the alternate state. However, I'm not able to show the selected date value in the column of a straight table. I'm trying to use an expression =GetFieldSelections({[Date1]} Date) but it doesn't work.

Please help.

Labels (1)
1 Solution

Accepted Solutions
vgutkovsky
Master II
Master II

Try something like date(only({Date1} Date))

Getfieldselections is not a function that you can use alternate states with.

Regards,

Vlad

View solution in original post

6 Replies
vgutkovsky
Master II
Master II

Try something like date(only({Date1} Date))

Getfieldselections is not a function that you can use alternate states with.

Regards,

Vlad

hkapadia
Contributor III
Contributor III
Author

Thanks Vlad for a quick response.

That worked as I wanted.

hkapadia
Contributor III
Contributor III
Author

Vlad,

As you mentioned, I was able to display amount based on 2 selected dates in the straight table.

Another problem I have is that if I try to select any dimension value in the straight table none of the other charts/tables that I have are filtered based on that dimension & the 2 selected dates. Is that because of the alternate states I'm using on the dates? Is there a way around that?

Thanks

Hitesh

vgutkovsky
Master II
Master II

By the way, I should mention that, as of 11.20 SR8, you can use alternate states with functions like getfieldselections.

I'm assuming your straight table is in the default state? If so, and depending on what exactly you want to do, you might be able to just use set multiplication. For example: date(only({Date1*$} Date))

Vlad

hkapadia
Contributor III
Contributor III
Author

Vlad,

Thanks for your reply but I'm confused. My straight table is in the default state but doesn't filter based on the other dimension that I select from the table.

--

Hitesh

vgutkovsky
Master II
Master II

Can you post one of your straight table expressions?

Vlad