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: 
ananth
Contributor
Contributor

How to unpack date variable

I have a date variable stored as =Num(Date#('2025-11-01','YYYY-MM-DD')).

How do I use this variable to filter values?

For example, I want to take the sum of amount of all entries where date is before this particular date variable.

 

I am using this as my expression:

Sum(
{
<
Date = {"<=$(=Num(vMinClosedDate))"}
>
}
Amount
)
but it evaluates to zero.

 

 

Labels (2)
2 Replies
MatheusC
Specialist II
Specialist II

Review your formatting. An important point is that if your variable has a certain format, the field associated with that filter (variable) must also be in the same format — in your case, the Date field.

- Regards, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!
Vegar
MVP
MVP

@ananth I think you're just missing a $-expansion. Try this:

Sum({<
Date = {"<=$(=Num($(vMinClosedDate)))"}
>}
Amount)