Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Independent Listbox without Alternate State

Hey,

I have a list box where its fields are dependent on the selection of another listbox.

In that listbox I want to display only sector specific measures dependent on the selection I made under sector. Each measure is assigned to its sector.

When I use this formula to filter my field and make a selection the listbox of sectors will also be affected. Is it possible to use the measure listbox independently except of using alternate states?

=if(GetFieldSelections(sector, ',', 10000, '$')='health',If(match([_Metricsector],'All','health'),_Metric,null()),

if(GetFieldSelections(sector, ',', 10000, '$')='industry',If(match([_Metricsector],'All','industry'),_Metric,null()),

if(GetFieldSelections(sector, ',', 10000, '$')='financial',If(match([_Metricsector],'All','financial'),_Metric,null()),null())))

Measure assignment is as follows:

LOAD * INLINE [

    _Metric, _Metriksector

    KPI1, All

    KPI2, health

    KPI3, industry

    KPI4, financial

];

1 Solution

Accepted Solutions
Digvijay_Singh

I could recreate your problem. See the attached updated sample, if you select KPI, it won't impact sector now.

View solution in original post

13 Replies
sunny_talwar

Not sure I understand why you need this independent listbox without using alternate state? Can you elaborate as to what you are trying to do?

Not applicable
Author

I do not want to use alternate state as it is not supported in NPrinting OnDemand, which I want to use.

The Listbox is just for condition purposes in a table, so which expressions to display depending on the selections made in the listbox.

sunny_talwar

So functionally, what are you trying to accomplish here?

Not applicable
Author

As mentioned in my first post I do not want this listbox to affect the other listbox (sector).

Currently it does, for example when I select a measure which is assigned to all sectors any sector will be selected in the sector listbox. I hope this helps.

sunny_talwar

I kind of understand your issue here, but for better understanding would you be able to share a sample?

Not applicable
Author

Depending on your current data model, would you be able to load the same field again in a separate table that isn't linked to the table containing the field you don't want to be affected?  You would basically be creating the same field again in a separate table specifically for the list box.  Not the most efficient method but since you're unable to use alternate states it's an idea.

Not applicable
Author

See attached.

Selecting the sector displays the right corresponding KPIs in the Measures Listbox, but when selecting KPI1 which is assigned to to any sector any entry will be selected in the sector listbox subsequently. In the consequence any company is displayed in the table and I cannot select a measure anymore.

Not applicable
Author

Mhh I understand you suggestion, but then I would need to create two listboxes for sector and always make a selection twice, right? One for the "normal" working data and one to get the right measures displayed?!

Digvijay_Singh

I am not sure but it may be the case that your data model needs some improvement, I am not able to understand why do you have separate fields Sector and _MeticSector, the content looks to be same. Is there any possibility to associate Sector to _Metric?

Also looks like typo, your field in script is _Metriksector, but you have used _Metricsector in the formula.

If you are not able to share sample, I tried to prepare one, can you rephrase ur need with reference to attached sample -