Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
anugangwar
New Contributor

How can I add Column names of data (from which a chart is created) as items of list box.

Hi Everyone,

Got terribly stuck with a situation. I have a data-set in excel in the following format:

     

DateCoalHydroSolarWind
1-Jan-17130250336404
1-Feb-17128219327423
1-Mar-17156287375454
1-Apr-17133253389452
1-May-17171253305469
1-Jun-17138251347430
1-Jul-17191279312474

I have created a stacked Bar chart out of this data, with each field (i.e. Coal, Hydro, Solar & Wind) appearing in different colors. Now I would like to have a list box with all these 4 field names. And once, I select a particular fueltype, the bar chart only displays data for that particular fuel. Thanks a ton for your help in advance.

7 Replies
antoniotiman
Honored Contributor III

Re: How can I add Column names of data (from which a chart is created) as items of list box.

Hi Anand,

See Attachment.

Regards,

Antonio

anugangwar
New Contributor

Re: How can I add Column names of data (from which a chart is created) as items of list box.

thank you very much Antonio for this as it is very helpful. Couple of questions here:

1. Under the Expressions - -> Conditional Check Box you have entered a formula as: SubStringCount(Concat(Fuel,' '),'Coal'). What does this mean here and what is the condition based on the count of fuel type occurrence?

2. In the inline statement, you have mentioned:

LOAD * Inline [

Fuel

Coal

Hydro

Solar

Wind];

Does it mean that Inline table created can be referred by the first entry, i.e. 'Fuel' anywhere (like you have used it in Listbox Field?

Thanks again, Anand

antoniotiman
Honored Contributor III

Re: How can I add Column names of data (from which a chart is created) as items of list box.

Hi Anand,

1) Condition is : text 'Coal' is in the selected Field/s Fuel.

2) 'Fuel' is Field Name. Colar,Hydro,Solar,Wind are values of Field 'Fuel'

Regards,

Antonio

anugangwar
New Contributor

Re: How can I add Column names of data (from which a chart is created) as items of list box.

Thanks for your prompt reply Antonio. and sorry to be naive there, but I thought SubStringCount(Concat(Fuel,' '),'Coal') function will return a number "1" in this case as coal would be appearing once in the list. How does 1 here translates to that the condition is met? Does 1 or any value more than 1 signifies 'TRUE' here? thanks, Anand

antoniotiman
Honored Contributor III

Re: How can I add Column names of data (from which a chart is created) as items of list box.

More specifically   condition is   0    or    <> 0

antoniotiman
Honored Contributor III

Re: How can I add Column names of data (from which a chart is created) as items of list box.

Just as if You wrote

=If(SubStringCount(Concat(Fuel,'|'),'Coal') > 0,1,0)

anugangwar
New Contributor

Re: How can I add Column names of data (from which a chart is created) as items of list box.

sure thing Antonio. thanks a ton for the explanation. anand

Community Browser