Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
stjernvd
Partner
Partner

Conditional Show on Text Box with 2 GetSelectedCount Fields

Hi,

In my text box 'text' section I've put this:

=If(GetSelectedCount(Metrics)=0 and GetSelectedCount(Dimension)=0,'Please Select a Dimension and Metric',(if(GetSelectedCount(Metrics)>0,'Please Select a Dimension', 'Please Select a Metric')))

and in the layout part I've put so that the text box only appears when:

=GetSelectedCount(Dimension)=0 and GetSelectedCount(Metrics)=0

These are the conditions for the different text to show in my text box:

1. When GetSelectedCount(Metrics and Dimension) = 0,  'Please Select a Dimension and Metric'

2. When GetSelectedCount(Metrics)>0 and GetSelectedCount(Dimension) =0,  'Please Select a Dimension'

3. When GetSelectedCount(Dimension)>0 and GetSelectedCount(Metrics) =0,  'Please Select a Metric'.

How do I formulate the correct formula in my text expression and layout tab so my text box shows the above texts accordingly?

1 Solution

Accepted Solutions
sunny_talwar

May be this as the text box expression:

=If(GetSelectedCount(Metrics) = 0 and GetSelectedCount(Dimension) = 0, 'Please Select a Dimension and Metric', If(GetSelectedCount(Metrics) > 0 and GetSelectedCount(Dimension) = 0, 'Please Select a Dimension',

If(GetSelectedCount(Metrics) = 0 and GetSelectedCount(Dimension) > 0, 'Please Select a Metric')))

and this on the layout tab:

GetSelectedCount(Metrics) = 0 or GetSelectedCount(Dimension) = 0

View solution in original post

3 Replies
sunny_talwar

May be this as the text box expression:

=If(GetSelectedCount(Metrics) = 0 and GetSelectedCount(Dimension) = 0, 'Please Select a Dimension and Metric', If(GetSelectedCount(Metrics) > 0 and GetSelectedCount(Dimension) = 0, 'Please Select a Dimension',

If(GetSelectedCount(Metrics) = 0 and GetSelectedCount(Dimension) > 0, 'Please Select a Metric')))

and this on the layout tab:

GetSelectedCount(Metrics) = 0 or GetSelectedCount(Dimension) = 0

stjernvd
Partner
Partner
Author

it worked thank you so much!

sunny_talwar

Awesome