Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Filtering values in a chart with a where type function

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.

3 Replies
MVP
MVP

Filtering values in a chart with a where type function

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

Filtering values in a chart with a where type function

Works great thanks.

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

Thanks

Not applicable

Filtering values in a chart with a where type function

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

Community Browser