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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
cristian_av
Creator III
Creator III

Set Expression on Date not working

Hi

I have a set analysis expression that is always giving me a zero value. I also have an if that gives me the correct value.

How should I write the set analysis for this if expression:

=if(FechaVencimiento<today(),sum(Cargo),0)

This is what i have so far, but giving me always zero values:

=Sum({<FechaVencimiento = {"$(='<' & today())"}>} Cargo)

Thanks!!

1 Solution

Accepted Solutions
sunny_talwar

May be you need to Add date() function with or without format?

=Sum({<FechaVencimiento = {"$(='<' & Date(today()))"}>} Cargo)

or

=Sum({<FechaVencimiento = {"$(='<' & Date(today(), 'FormatHere'))"}>} Cargo)

View solution in original post

2 Replies
sunny_talwar

May be you need to Add date() function with or without format?

=Sum({<FechaVencimiento = {"$(='<' & Date(today()))"}>} Cargo)

or

=Sum({<FechaVencimiento = {"$(='<' & Date(today(), 'FormatHere'))"}>} Cargo)

cristian_av
Creator III
Creator III
Author

Thanks!!

I've added the date in the set expression with no luck, but adding the date in the load script it worked...

Not sure why.!