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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
alex-wb
Contributor III
Contributor III

Counting between two dates not working

Hi,

For some reason when I am trying to counts all incidents the occurred between two dates it always misses the dates that have the week ending the max IR_WEEKEND, what is wrong with my code?

Thanks,

if(

Sum(
Aggr(Count({$<
IR_WeekEnd={">=$(=WeekEND(max(IR_WeekEnd),-51))<=$(=WeekEND(max(IR_WeekEnd)))"}
>}Incident_ID)
,IR_WeekEnd))
>0
,
Count({$<
IR_WeekEnd={">=$(=WeekEND(max(IR_WeekEnd),-51))<=$(=WeekEND(max(IR_WeekEnd)))"}
>}Incident_ID))

2 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @alex-wb ,

Please modify your expression as below.

if(

Sum(
Aggr(Count({$<
IR_WeekEnd={"='>=' & $(=WeekEND(max(IR_WeekEnd),-51))& '<=' & $(=WeekEND(max(IR_WeekEnd)))"}
>}Incident_ID)
,IR_WeekEnd))
>0
,
Count({$<
IR_WeekEnd={"='>=' & $(=WeekEND(max(IR_WeekEnd),-51))'<='$(=WeekEND(max(IR_WeekEnd)))"}
>}Incident_ID))

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
alex-wb
Contributor III
Contributor III
Author

@abhijitnalekar  thanks for the response, unfortunately that doesn't work. It doesn't return anything for me.