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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to make a chart visible based on the value selected?

Hi All,

My requirement is

Ex:

Say field name has a,b,c data

Now If I select a one chart should be displayed and if I select b one more chart should forb should be displayed and on c one more for c.

So my doc should have 3 charts.

How can I achieve this? I tried in layout conditional but its in appropriate. Can anyone help please?

Regards,

Prajna

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=SubStringCount('|' & GetFieldSelections(Metrics, '|') & '|', '|a|')

Regards,

Jagan.

View solution in original post

12 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this in Chart Properties -> Layout -> Conditional

assuming that only one selected value in Field

For Chart a

=If(GetFieldSelections(FieldName) = 'a', 1, 0)

or just GetFieldSelections(FieldName) = 'a'

For Chart b

=If(GetFieldSelections(FieldName) = 'b', 1, 0)

or just GetFieldSelections(FieldName) = 'b'

For Chart c

=If(GetFieldSelections(FieldName) = 'c', 1, 0)

or just GetFieldSelections(FieldName) = 'c'

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

Hi

PFA Hope this will help you

Not applicable
Author

PFA,

This would help you

Not applicable
Author

What if I select a and b multiple selection or any combination between the three values  it should show both the charts.. but here I can do only  one selection..

Regards,

Prajna

Not applicable
Author

I can't open the document as em using personal edition:(

Regards,

Prajna

jagan
Partner - Champion III
Partner - Champion III

Hi,

Then try like this

=SubStringCount('|' & Concat(distinct FieldName, '|') & '|', '|*|')

Replace * with your value a/b/c in above expression

Regards,

Jagan.

Not applicable
Author

But by default all the 3 chart is visible when I give clear all. Cant I make it visible on selection only?

I tried

SubStringCount('|' & Concat(distinct Metrics, '|') & '|', '|a|')

SubStringCount('|' & Concat(distinct Metrics, '|') & '|', '|b|')

SubStringCount('|' & Concat(distinct Metrics, '|') & '|', '|c|')

Regards,

Prajna

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=SubStringCount('|' & GetFieldSelections(Metrics, '|') & '|', '|a|')

Regards,

Jagan.

NareshGuntur
Partner - Specialist
Partner - Specialist

Hi Prajna,

You can use the below statement in the conditional(Layout tab)

FindOneOf( GetFieldSelections(Show), 'a') > 0

FindOneOf( GetFieldSelections(Show), 'b') > 0

FindOneOf( GetFieldSelections(Show), 'c') > 0

Here even if you select both a and b, the first and second charts will be shown and if you select all the 3, all the charts will be shown. But if you don't select anything no chart will be shown.

Hope this fulfils your requirement

Best Regards,

Naresh