Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
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...
alex-wb
Contributor III
Contributor III
Author

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