Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
samuel_brierley
Creator
Creator

count if

count ({$< [Fault Cleared] = {"<=$=(Max([Date Detected]))"}>}[Fault Cleared]

Can someone explain what is wrong with this expression?

what its supposed to do is count all row where Fault Clearerd is less than the Max Date detected

12 Replies
swuehl
MVP
MVP

Field Fault Cleared is not recognized as a timestamp by QV, because it does not match the default timestamp format:

SET TimestampFormat='DD/MM/YYYY hh:mm:ss[.fff]';

It's format is indeed

'DD/MM/YY hh:mm:ss'

like

25/01/13 20:07:02

It's best to handle that in the load script, either by correting your default timestamp format, or by interpreting the value on load:

LOAD

     ....

timestamp#([Fault Cleared],'DD/MM/YY hh:mm:ss') as [Fault Cleared],

...

samuel_brierley
Creator
Creator
Author

I LOVE YOU!!!!!!

antose
Partner - Creator II
Partner - Creator II

Help one of my customer with similar problems last week

Count({$< MatDatum={"<$(=Date(Today(), 'YYYYMMDD'))"} >} NyckelHuvudMITPLO)

So in you case can this works?

Count({$< [Fault Cleared] = {"<=$(=Date(Max([Date Detected]), 'DD/MM/YYYY'))"} >} [Fault Cleared])