Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Lakshman_1031
Partner - Contributor
Partner - Contributor

Displaying charts based on list box values selections

Hi All,

I have one list box in that  having values are Sales, SalesR, SalesE, Region, RegionE, Central.

in the same i have Charts like Sales, SalesR, SalesE, Region, RegionE, Central.

if i select the Sales in the list box then select the Sales chart, if i select Sales, SalesR values then display the Sales, salesR charts if no selections from the list box then hide the charts.

if i select the sales and Central then display the Sales, Central charts.

if i select sales and salesR it will display First and Last chart, but if i select the sales and central it is showing First chart and last chart Reaming is showing empty. But i want to show one by one in without space.

Please Suggest me this scenario is  Possible or not, if possible please suggest me how to achieve this scenario.

if possible please share me example.

Thanks & Regards,

Lakshman

 

19 Replies
Lakshman_1031
Partner - Contributor
Partner - Contributor
Author

Hi Rubenmarin,

Thank you very much for your support.

i achieved my expected results and i am getting one more problem.

in the same way display in text boxes also, i have used below expression in text box but it not working. 

Please suggest me based on selection text values change dynamically.

=if(Measures='Sales','Sales',if(Measures='Sales info','Sales info','Sales'))

and in the list box is added one more value that is 'All'.

if i select Sales and sales info it is showing Sales, chart and Sales info chart then if i select 'All' then display the all charts.

Please see the below Qvw.

Please Suggest me how to achieve this scenario.

Thanks & Regards,

Lakshman

 

rubenmarin

Hi, it won't work because Measuers will return Null() when there are more than one value selcted, thats why you need to use Index and Concat, to merge all diffrent values in a single string and look in that string the searched value

Once you have all expression conditions working as expected you can use the same conditions to selecte the text:

If([ContitionsForExpression1], 'TextExpression1',

  If ([ContitionsForExpression2], 'TextExpression2',...)

 

For the 'All you only need to add the condion in the charts to show the expected expression.

Sample attached, I also emulated the second chart text using the concatenated if

Lakshman_1031
Partner - Contributor
Partner - Contributor
Author

Hi Rubenmarin, 

Thanks for your Support and your support is very great.

i did not achieve full requirement sorry for again asking for doubt. 

Here i selected Sales info and Sales values, but not coming sales value.

Index(';'& Concat(Measures, ';') &';', ';Sales;')=0 and Index(';'& Concat(Measures, ';') &';', ';sales Info;')=0 and Index(';'& Concat(Measures, ';') &';', ';Sales value;')

like sales ->Sales info-> Sales values this way charts are showing properly.

But my selection like last value, Middle value, except first value, it is not coming charts properly and it is showing all expressions disabled.

Like this way  Sales Info->Sales total  this type of selections was not working properly.

i tried but i am not getting any solution.

in the same way list box having 10 values and 10 charts please suggest me how to achieve this scenario.

in first chart i have wrote below expression

Index(';'& Concat(Measures, ';') &';', ';Sales;')=0 and Index(';'& Concat(Measures, ';') &';', ';Sales info;')=0 and Index(';'& Concat(Measures, ';') &';', ';Sales values;')=0 and Index(';'& Concat(Measures, ';') &';', ';Sales total;')=0 

and Index(';'& Concat(Measures, ';') &';', ';Sales Amount;')=0 

first chart is working fine.

in second chart is 

Index(';'& Concat(Measures, ';') &';', ';Sales;') and Index(';'& Concat(Measures, ';') &';', ';sales info;')=0 and Index(';'& Concat(measure, ';') &';', ';Sales value;')

this way i wrote.  if my first selection is Sales then sales -> sales info or sales values is working.

if my first selection is Sales info -> sales total this way is not working.

 

Please Suggest me how to achieve this particular scenario. 

 

Please suggest me how to achieve this type of scenario.

Thanks & Regards,

Lakshman

 

 

 

rubenmarin

Hi, new approach, this can be used for many charts, should be a clever way using parametrized variables but it will take a time to develop that I don't have now.

Just use the index that fits for each chart, check the attachment to understand.

Lakshman_1031
Partner - Contributor
Partner - Contributor
Author

Hi Rubenmarin,

Thanks for your replay.

I tried same way you mentioned in the QVW, But that is not working properly.

Please suggest me is there any way to achieve this scenario.

 

Thanks & Regards,

Lakshman

rubenmarin

I have already suggested you different ways to achive that scenario. Why is not working?

rubenmarin

Hi Lakshman, are you still trying, can you tell me why the suggested approaches are not working?

Lakshman_1031
Partner - Contributor
Partner - Contributor
Author

Hi Rubenmarin,

Thanks for your replay.

Exactly my requirement is i have one list box in that having 10 values and having 10 charts.

Dynamically showing and hide the charts based on the list box selections.

for example if i select the sales info from list box then display sales info chart as first chart and then 2nd selection is Sales Amount then showing Sales Amount as 2nd chart and if i select Sales as 3 rd selection then display 3rd chart as Sales chart like that  all the selection.

if is select the Sales Info as first selection then display Sales info as first chart.

whatever if i select first value then will display first chart, and  if i select 2nd value then will display 2nd chart like that every selection.

if i remove the any selection in the list box then it will adjust the charts.

in the same way display text box and showing current selection value in every chart.

i have tried previously you suggested way, But i am not getting exact result. if i take sales info as first selection then select sales as second selection then it is showing always first chart as sales and if i take 3 selection it won't display data .

Please suggest me is there any possibility to achieve this scenario.

 

Thanks & Regards,

lakshman

rubenmarin

Hi, ok, I don't think there is a reliable way of keeping the order the user selects values, maybe you can create 10 variables from chart 1 to chart 10, using a drop-down selection for each of the charts.

I upload a sample with just 2 charts.

Lakshman_1031
Partner - Contributor
Partner - Contributor
Author

Hi Rubenmarin,

Thanks for your replay.

It is very helpful.

 

Thanks & Regards,

Lakshman