Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Filter data with a Count and Where clause

Hi all!

The short way:

I need to add a column that filter table record by a slq count with condition on a particular field.

----------------------------------------------

The long way:

I've a report generated by a Graph object in QlikView.

The QlikView main script contains three tabs with several load statementes inside.

This script load data from multiple QVD.

The QVW that create all those QVD load data from sql tables.

I need to modify that graph by adding a column which records are calculated by the following query:

select count(*) from T where T.field=value

(therefore the where clause should countain another condition on a field belonging a table still not present inside QV data model)

What is the best approach to accomplish this task??

Any help  will be greatly appreciated!

Thanks in advance!

3 Replies
Not applicable

Re: Filter data with a Count and Where clause

I found this solution that add the following expression:

Sum(if(FILED='some_value', 1, 0))

can be a correct one?

What if a would add a condition on a filed belonging a table still not present in the QV data model?

Not applicable

Re: Filter data with a Count and Where clause

Hi ,

You can restrict the record in the object level.

Ex:

Count(if(F1='Value',Value)

Not applicable

Re: Filter data with a Count and Where clause

Thanks, I appreciate your reply..!

How can I solve the second part of my question?