Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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!

4 Replies
Not applicable
Author

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
Author

Hi ,

You can restrict the record in the object level.

Ex:

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

Not applicable
Author

Thanks, I appreciate your reply..!

How can I solve the second part of my question?

kitanbelles
Contributor
Contributor

Hi, 

 

What if I want to do not equals to