Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
BrianDH
Creator II
Creator II

Filter not working in qlik but it does in SQL

=Aggr(IF (ACTIVITY_ID <> 'NON-CAPITAL',
             IF( PROCESSING_STATUS = 'A',
            IF( (Sum(BUDGET_AMT) / count(PROJECT_ID) <> Sum(BH_AMOUNT_BUD))
,MasterKey))),MasterKey)

Team

My filter Activity not Non Capital has no effect on my filter masterkey.  However, it does work in SQL developer.

I have tried Trim(ACTIVITY_ID), I have altered the order in my IF.  

I tried:

=Aggr(IF (ACTIVITY_ID <> 'NON-CAPITAL' and  PROCESSING_STATUS = 'A', and  (Sum(BUDGET_AMT) / count(PROJECT_ID) <> Sum(BH_AMOUNT_BUD))
,MasterKey),MasterKey)

Still no luck.

Suggestions?

Labels (1)
1 Solution

Accepted Solutions
BrianDH
Creator II
Creator II
Author

Resolved

Load ..........

FROM [lib://QVD Files/PeopleSoft/ProjBalWCR.qvd]
(qvd)
where (ACTIVITY_ID) <> 'NON-CAPITAL'
and (ACTIVITY_ID) <> 'NON-CAP'
and PROCESSING_STATUS = 'A';

View solution in original post

5 Replies
Qlik1_User1
Specialist
Specialist

Try this

Aggr(IF (NOT MATCH(ACTIVITY_ID ,'NON-CAPITAL') and  PROCESSING_STATUS = 'A' and  (Sum(BUDGET_AMT) / count(PROJECT_ID) <> Sum(BH_AMOUNT_BUD))
,MasterKey),MasterKey)

BrianDH
Creator II
Creator II
Author

=Aggr(if (NOT MATCH(ACTIVITY_ID ,'NON-CAPITAL') ,MasterKey),MasterKey)

 

Now no rows are returned.   I should get 1 row.

BrianDH
Creator II
Creator II
Author

Also tried =Aggr(if (WILDMATCH(trim(ACTIVITY_ID) ,'NON-CAPITAL') ,MasterKey),MasterKey)

 

No rows returned.  I did a copy paste from the field to get my text "Non-Capital" text

Qlik1_User1
Specialist
Specialist

Try to break your expression and check if it working like

=if (WILDMATCH(trim(ACTIVITY_ID) ,'NON-CAPITAL') ,MasterKey,MasterKey)

and than starts adding your conditions

BrianDH
Creator II
Creator II
Author

Resolved

Load ..........

FROM [lib://QVD Files/PeopleSoft/ProjBalWCR.qvd]
(qvd)
where (ACTIVITY_ID) <> 'NON-CAPITAL'
and (ACTIVITY_ID) <> 'NON-CAP'
and PROCESSING_STATUS = 'A';