Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set analysis to filter fields in chart

Hi,

Would like to know on how can I filter the fields in Qliksense chart using set analysis.

Currently I am trying this code:

=If(vSourceType = 'Data 1', Only({$<SourceType = {"Data 1"}>}SourceType), Only({$<SourceType = {"Data 2"}>}SourceType))

What I want to return is when user select the Data 1 in selection, then Data 1 will only appear in SourceType field. Else, Data 2 in SourceType.

Thanks in advance!

13 Replies
sunny_talwar

So, when you select Data 1 it should filter down to only those rows where the Type is Data 1 (unless you have set analysis to over ride selections), right?

Anonymous
Not applicable
Author

Exactly! I'm just new to Qlik and I would love to learn more..

sasiparupudi1
Master III
Master III

May be try

If(vSourceType = 'Data 1',

Aggr(Max({$<SourceType = {"Data 1"}>}SourceType),Year,Month),

Aggr(Max({$<SourceType = {"Data 2"}>}SourceType),Year,Month)

)

Anonymous
Not applicable
Author

I found the right answer somewhere in other post here in community.

I really appreciate your effort by replying  to this post and looking forward to learn more in Qlik!