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

Alternate State layout

Hi All,

I had an issue with alternate state.
I have 1 straight table for which I am using Alternate State named 'Alternate State1' .
I have 1 dimension named 'Contract'. My requirement is the Straight table should be displayed only when no contract is selected i.e
in layout I need to add expression as :
getselectedcount(Contract)=0

In normal situations this condition will work , but as I am using Alternate State for the chart, Contract selections are not affecting on that table, and we can't use the ($) symbol in layout expression to affect based on current selection as this is not feasible in getSelectedCount expression.

Is there any other way to make this work?

Thanks in Advance ...!

3 Replies
Anonymous
Not applicable

Hi Polisetti,

I've had a play with this and I think the following could work for you

=If(Count({[Alternate State1]}DISTINCT Contract) = Count({[Alternate State1]}{1}DISTINCT Contract),0,1)

The DISTINCT might not be required depending on your data.

pradnyat
Creator
Creator

Hi Adam,

Thanks for your quick response.

This expression will not work in this case as the data in contract field is restricting over some other dimension selections.

Is there any other way to do this?

Anonymous
Not applicable

Well, you could throw in a TOTAL <OtherField> into the expression if that will help? I think this method of Counting the fields, or some other aggregation, is the closest you are going to get. As you stated, the Alternate State options around the field selection are a bit limited.

There is probably some logical combination of what I suggested and other expressions which will accept Alternate States which will give you the effect you want. I originally looked at using Concat() to build a string and then Len() to measure if it was longer than 0, and there are likely to be other approaches.