Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filtering values in a chart with a where type function

Hi all,

Ive been trying to figure out how to write an expression to only display certain data in a chart, without having to select that option from a list box.

Lets say I have workorder table and there are 2 work types: EM and PM.

I want the chart to only show a count of EM ones, without having to select EM from a list box anywhere.

Ive tried to use an If: If(Worktype='EM',sum(Workordercounter)), but it didn't work.

I also tried to use some form of where clause: sum(Workordercounter) where Worktype='EM', but this didn't work.

Thanks

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Daniel,

Try this as expression

Sum({< Worktype = {'EM'} >} Workordercounter)


Hope that helps

EDIT: Your if conditional seems to be ok, but take into account that field names in QlikView are case sensitive, so Worktype is not equal to WorkType.

View solution in original post

3 Replies
Miguel_Angel_Baeyens

Hello Daniel,

Try this as expression

Sum({< Worktype = {'EM'} >} Workordercounter)


Hope that helps

EDIT: Your if conditional seems to be ok, but take into account that field names in QlikView are case sensitive, so Worktype is not equal to WorkType.

Not applicable
Author

Works great thanks.

For future information - what is the syntax theory behind the {} curly brackets and <> brackets.

Thanks

Not applicable
Author

It's called Set Analysis.

Take a look in the QlikView help section, here the syntax is explained in details. There are also a lot of topics in the forum discussing this feature, as it is quite powerful.

\\Jens