Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
manideep78
Partner - Specialist
Partner - Specialist

Filter data for only selected charts

Dear community,

I have a requirement in filtering data.

I have 2 line charts in a sheet. I need to filter those 2 charts with the help of slider. But those filtered slider values should not effect any of the other charts. and also If I want to filter data from any of the other filters it should effect the current chart.

can we do this with the help of alternate states?

Please help me in this

Thanks a ton in advance.

Regards

Manideep

17 Replies
jerem1234
Specialist II
Specialist II

What is your main goal for this requirement? The problem here is that when you make selections in your fields to your left, it will limit what LOT's you can choose in your LOT field. Therefore when you use filters on the left, you cannot carry them over over to the alternate state, unless you also restrict the alternate state to those LOTs.

manideep78
Partner - Specialist
Partner - Specialist
Author

Hi jerem1234

I my attached application. I just want to apply my slider vlaues to only chart, not more than that. and if I again filter values from left side filters those needed to be applied in the chart as well. I need combination of both these.

So My goal is apply slider values to single chart + apply all other filters to the same chart.(slider values should not effect other filter values)

Please help me how to do.

manideep78
Partner - Specialist
Partner - Specialist
Author

any help please??

jerem1234
Specialist II
Specialist II

See if attached gets you want you want. I made your slider to the expression:

=aggr(only({<LOT=P({$}LOT)>}LOT),LOT)

So it only lists the Lots that are available for the selections made on the left.

Then I added the set expression:

{$*IRFilters}

to your formulas.

And changed your charts to that alternate state.

The only thing here is that when you make a selection on the slider, then change your selections on the left, the Lot selections in the alternate state won't be cleared (so if the LOT numbers arent available in the current selections, they won't appear as selected in the slider).

Hope this helps!

manideep78
Partner - Specialist
Partner - Specialist
Author

Hi jerem1234

we are very closer, This is what I need actually, But When I clear the selections the slider is completely disappearing. instead of that it would be good if we make a fixed length even if we clear the filters. Please help me in achieving this.

jerem1234
Specialist II
Specialist II

What do you mean the slider is completely disappearing? The actually slider or the values that are displayed on the slider? You always might run into problems this way since the behavior you want is sort of the opposite behavior of how Qlikview wants to behave and that the sets of Lot numbers are not always the same for each selection.

I think at this point, you may want to consider changing the way you go about it. Maybe re-visit your orignal question as to why you want the selections in Lot to not affect your other charts? Is there a simpler way? Maybe the user should be aware to clear the Lot selections since this may affect other charts.

One option: Since you want to segregate these 2 charts from the others, I would put them on their own sheet. This way you can keep a slider (I would maybe use list box instead since this will restrict the possible values for Lot) for Lot without any alternate states. Then you can set a Trigger upon leaving this sheet, to clear all selections made in the Lot field. This way, you can customize the entire sheet with how you want these two charts to behave. Maybe change the design of the sheet, move things around, etc. Keeping it simple will make things easier, on both a User and Maintenance perspective. Hopefully some of these options sparks an idea for you.

Hope this helps!

manideep78
Partner - Specialist
Partner - Specialist
Author

Hi jerem1234

I want them in a sheet where other charts also exist in a contianer. Thats my actual requirement. I understood what you said. But here my problem is when I put slider is discrete mode, the length of the slider becomes zero until we palce a mouse pointer over there(thats what i mean in disappearing.). and If we put my Slider in continuous/Numeric mode it is showing only Lots with Numeric values. I have lots with both Numeric and string values. Please suggest.

jerem1234
Specialist II
Specialist II

So you want a default LOT selection every time I suppose?

Create a trigger for OnAnySelect for your Document Event Triggers when you go to Document Properties on the trigger tab. Then add the trigger Select in Field with:

Field = LOT

Search String = =if(GetSelectedCount(LOT)<2, maxstring(aggr(only({<LOT=P({$}LOT)>}LOT),LOT)), '(' & concat(distinct aggr(only({<LOT=P({$}LOT)>}LOT),LOT), '|') & ')')

This formula should work even with multiple LOT's selected. And I can't say how this will affect performance.

Hope this helps!