Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
dnowebdn
Contributor
Contributor

simple conditions

Hi ,

I have a chart which has to change the values based on the conditions or selections made on the filter.

Conditions apply

2 Replies
undergrinder
Specialist II
Specialist II

Hi,

I didn't delve into the example application, but based on your description the

getfieldselection() and the getselectedcount() functions can help you.

If you want to manipulate a measure based on selection, let see the next example.

=if(getselectedcount(ColumnA)>0,sum(ColumnB),sum(ColumnC))

explanation: when any value is selected in ColumnA then the measure shows sum of ColumnB else ColumnC.

If you want to watch a specific value then:

=if(getfieldselection(ColumnA)='value',sum(ColumnB),sum(ColumnC))

explanation: when the 'value' is selected in ColumnA then sum of ColumnB else ColumnC.

You can combine with match as well:

=if(match(getsfieldselection(ColumnA),'value1',value2')>-1,sum(ColumnB),sum(ColumnC).

https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Fiel...

https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Fiel...

G.

dnowebdn
Contributor
Contributor
Author

any help