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

Adding set analysis to count function

Hello, I have a functioning expression :- count(if(mid(Move_Out_Date,4,2)='08'and (mid(Move_Out_Date,7,4)='2011')and left(Post_Code,4)='SO15','Count'))

I am trying to add a bit of set analysis to this expression and its not liking it, here is what I am trying :-

count(if(mid(Move_Out_Date,4,2)='08'and (mid(Move_Out_Date,7,4)='2011')and left(Post_Code,4)='SO15' and Count({< Installation= {">1"} > } CA),'Count'))

5 Replies
Not applicable
Author

try like

count( {< Installation= {">1"} > }if(mid(Move_Out_Date,4,2)='08'and (mid(Move_Out_Date,7,4)='2011')and left(Post_Code,4)='SO15',CA))

Not applicable
Author

Qlikview didnt like that, error in expression :-

qverror.JPG

Not applicable
Author

spencer,

Two thing to note:

Count({< Installation= {">1"} > } CA) is not a condition. It would always return true.

Count({< Installation= {">1"} > } CA) is a group funtion (not a row level funtion) which is applied on what seems to be applied on a row operation. This doesnt make sense to QV.

If you are trying to validate this at for a dimension then try aggr() function for the new condition. Like

=Count(if(aggr(Count({< Installation= {">1"} > } CA), CA) > 1,

Count(if(mid(Move_Out_Date,4,2)='08'and (mid(Move_Out_Date,7,4)='2011')and left(Post_Code,4)='SO15',1)),0))

Kiran.

Not applicable
Author

This is spitting out Null '-'

Not applicable
Author

Try: (i believe there is an extra ',' infront of if in you syntax)

count( {< Installation= {">1"} > }if(mid(Move_Out_Date,4,2)='08'and (mid(Move_Out_Date,7,4)='2011')and left(Post_Code,4)='SO15',CA))