Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have data :
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
Try this:
=Count({<delivery_date={"<=$(=Date($(Variable1), 'YYYY-MM-DD'))"}>}id)
UPDATE: I think the issue is related to the formatting here. vVarable1 is in number format and in order for set analysis to work, it needs to be converted to a very specific date format -> YYYY-MM-DD which matches the date format for delivery_date. Read more about dates in set analysis here: Dates in Set Analysis
Aiolos,
You missed to add $ Symbol. Try like below,
=Count({<DATE={"<=$(Variable1)"}>}ID)
Hi,
try like
Count({<DATE={"<=$(Variable1)"}>}ID)
or
Count({<DATE={"<=$(=Variable1)"}>}ID)
Regards
go through the document provided by Qlik on set analysis.
Hi,
Try like this
Count({<DATE={"<=$(Variable1)"}>}ID)
Thanks for reply, but could you please see my new attached, it's a little strange for my example, I don't know why.
Thanks.
Aiolos Zhao !
Thanks for reply, but could you please see my new attached, it's a little strange for my example, I don't know why.
Thanks.
Aiolos Zhao
Thanks for reply, but could you please see my new attached, it's a little strange for my example, I don't know why.
Thanks.
Aiolos Zhao
Thanks for reply, but could you please see my new attached, it's a little strange for my example, I don't know why.
Thanks.
Aiolos Zhao
Try this:
=Count({<delivery_date={"<=$(=Date($(Variable1), 'YYYY-MM-DD'))"}>}id)
UPDATE: I think the issue is related to the formatting here. vVarable1 is in number format and in order for set analysis to work, it needs to be converted to a very specific date format -> YYYY-MM-DD which matches the date format for delivery_date. Read more about dates in set analysis here: Dates in Set Analysis