Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
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.!