Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Ironzem
Contributor III
Contributor III

COUNT IF

Hi , I am trying to do an expression to count row where another matches a certain value , I currently got this expression but still in error     "  If (match(FP_TYPE,'Transfer',count ({$<[Flag]={1}>} Flag) "

COUNT flag row only for the Transfer

FP_TYPE FLAG
Transfer 1
Exit 0
Transfer 0
Entry 1
Transfer 0
Transfer 1

 

Labels (2)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

How about:

Sum({<FP_TYPE={'Transfer'}>}Flag)

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

Ironzem
Contributor III
Contributor III
Author

Thank You - That worked perfect , not sure if I should put this on another post or if it is ok to on this post .

The scenario I have now is to do same type count but only the first flag for the day , it is now for the 'Exit' but I only want the 1st entry for the day

FP_TYPE TImestamp Flag
1st Entry 18-09-2022 08:02 1
Exit 18-09-2022 08:08 0
Transfer 18-09-2022 08:09 0
Exit 18-09-2022 08:10 1
Exit 18-09-2022 08:19 1
Exit 18-09-2022 08:34 1
1st Entry 17-09-2022 04:42 1
Exit 17-09-2022 04:55 0
1st Entry 17-09-2022 09:18 1
Exit 17-09-2022 09:42 0
Exit 17-09-2022 09:43 1
1st Entry 18-09-2022 04:08 1
1st Entry 18-09-2022 04:23 1
Exit 18-09-2022 04:25 0
Exit 18-09-2022 04:29 1

 

Ironzem
Contributor III
Contributor III
Author

I used Distinct - Seems to work ,busy checking

 

Ironzem
Contributor III
Contributor III
Author

All good - Thank you