Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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

 

1 Solution

Accepted Solutions
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.

View solution in original post

19 Replies
rubenmarin

Hi, I'm not sure of what you are trying but seems that you need to use contitional expression in expression tab of the chart and/or conditional show in design tab.

Lakshman_1031
Partner - Contributor
Partner - Contributor
Author

Hi,

Thanks for replay.

I have list box with 5 values and 5 charts. based on the selections charts will display. if no selection is there then display all charts.

i have used Max(Index(ListboxName,'Value)), it is working fine, but if values are having similar then it will display both charts.

for example values like sales, sales info, then if i click 'Sales info' then display the Sales chart and Sales info chart.

Please suggest me how to avoid this scenario.

And if i select first and last chart values in list box it is showing first and last chart and reaming is hide and empty space is coming, but i want to display charts one by one if any selections in list box.

if i select 3 rd and 4th it is i want to display first and second like that.

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

 

Thanks & Regards,

Lakshman  

 

 

rubenmarin

Hi, similar values can be avoided using separators, ie:

Index(';'& Concat(ListboxField, ';') &';', ';Value;')) // the starting and ending semilcolor will help with similar values, one will be ';Sales;' and the other ';Sales Info;'.

Hope this helps, regards.

Lakshman_1031
Partner - Contributor
Partner - Contributor
Author

Hi,

Thanks very much for your replay.

it is very helpful.

Please suggest me below scenario is it possible or not.

in the above scenario list box having 5 values and 5 bar charts.

if i click Sales Value then it is showing Sales chart as first place, if i select Sales info values then display Sales info chart as second place.

if i select Sales info chart it is showing 2 position and first position is showing empty.

But if i select the Sales info it is showing first position. and if i select both Sales and Sales info both are showing first is sales chart and 2nd is Sales info chart.

Please suggest me how to achieve this scenario.

 

Thanks & Regards,

Lakshman

 

 

 

 

rubenmarin

Hi, I dont0 get the difference between this two:

-if i select Sales info chart it is showing 2 position and first position is showing empty.

-But if i select the Sales info it is showing first position. and if i select both Sales and Sales info both are showing first is sales chart and 2nd is Sales info chart.

In any case you can have all 5 chars with all expressiones needed and use contional expression to select wich expression will show in each chart. ie. for second chart conditonal expression for 'Sales Info' can be:

If(Index(';'& Concat(ListboxField, ';') &';', ';Sales Value;') and Index(';'& Concat(ListboxField, ';') &';', ';Sales Info;'), 1, 0)

You won't really need all expresions in all charts but you'll see which ones are needed when you start to configure them.

Regards.

Lakshman_1031
Partner - Contributor
Partner - Contributor
Author

Hi ,

Thanks for replay.

My problem is display the charts potions is dynamically.

I have 5 charts and we can place it one besides/below the other but to display them dynamically on user selection.

please suggest me how to achieve this scenario.

 

Thanks & Regards, 

Lakshman

 

 

rubenmarin

Hi, it's the same as befor: you need to use contitional expression in expression tab of the chart and/or conditional show in design tab.

I attach a sample on how it can work. If this is not what you are looking for please upload a sample that shows your needs.

Regards.

Lakshman_1031
Partner - Contributor
Partner - Contributor
Author

Hi ,

Thanks for your supporting.

Please see the below attached Qvw.

Here having Measure likes Sales, Sales Info, Sales total, Sales value and 4 charts corresponding to the values.

if i select the sales it is showing Sales charts, in the same all charts are showing.

my Selection is Sales total it is having last position to display the chart, but my requirement is my selection is sales total then it is showing sales chart position it means it is showing first chart, in the same way what ever the selection is first it is showing first and next selection is showing next like that, and if i clear the selection it is showing as it is it means Sales chart is showing first, next Sales  info like that.

Please suggest me how to achieve this scenario.

 

Thanks & Regards,

Lakshman

 

rubenmarin

As said before all matters is palying with conditional expression and conditional shows. 

If something fails you can adjust it.

Regards.