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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
uacg0009
Partner - Specialist
Partner - Specialist

Question about date in set analyst with variable

Hi All,

I have data :

Date Set Analyst.JPG

And I have a variable = today()

I just want to calculate that count(id) before the variable(today).

I want to make it using set analyst not if else.

So I try to use =Count({<DATE={"<=Variable1"}>}ID), but it shows 0.

I think it's a easy request, but i don't know why, maybe it's because of type.

Could you please help?

Thanks.

Aiolos Zhao

Labels (1)
12 Replies
tamilarasu
Champion
Champion

Either change the variable like

Variable1    

=Date(today()-5,'YYYY-MM-DD')


Or Change expression like

=Count({<delivery_date={"<$(=Date($(Variable1),'YYYY-MM-DD'))"}>}id)

uacg0009
Partner - Specialist
Partner - Specialist
Author

Hi Sunny,

Thanks for reply, it works now.

I also think that is because of the date type, so I tried <=date($(variable)), but it's wrong.

Anyway, thanks for your help. It bothered me because I think it's a some issue and strange.

Aiolos Zhao

uacg0009
Partner - Specialist
Partner - Specialist
Author

Hi Tamil,

Thanks for your help, it's also a good method to change the variable defination.

Thanks.

Aiolos Zhao