Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
vgadang1
Partner - Contributor III
Partner - Contributor III

Count If

Hi,

I can't get this to work - I am trying to count the apps if the last accessed is more than 45 days. 

Count({$

<(interval(today(2)-daystart(max(LogTimeStamp)),'d') = {>"45"}>

} [App Name]) 

8 Replies
BrunPierre
Partner - Master
Partner - Master

Count(If(Interval(Today(2)-DayStart(LogTimeStamp, 'dd')>45,[App Name]))

or

better to derive the the days at the back end and use an expression like the below.

Count({<[Days Field] = {'>45'}>} [App Name])

vgadang1
Partner - Contributor III
Partner - Contributor III
Author

@BrunPierre Count(If(Interval(Today(2)-DayStart(Max(LogTimeStamp, 'dd')>45,[App Name)) did not work, 

vgadang1_0-1672155477668.png

 

Taoufiq_Zarra

@vgadang1  mayebe

=Count({$<LogTimeStamp = {">=$(=Date(Today()-45))"}>}  [App Name])
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
vgadang1
Partner - Contributor III
Partner - Contributor III
Author

Hi @Taoufiq_Zarra ,

Thank you, It still gives me inaccurate count, but may be I can get this to work. I am trying. 

vgadang1
Partner - Contributor III
Partner - Contributor III
Author

vgadang1_0-1672157765170.png

It is counting Less than 45 days, I need the inverse but I cant get it to work 

 

Taoufiq_Zarra

        @vgadang1 

=Count({$<LogTimeStamp = {"<=$(=Date(Today()-45))"}>}  [App Name])
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
vgadang1
Partner - Contributor III
Partner - Contributor III
Author

the output looks like this, output is completely off.

vgadang1_0-1672161619725.png

 

Taoufiq_Zarra

if not OK

can you share a sample data and the expected output

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉