Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Expression

Hello All,

I am getting "-" for this set expression

Only({$<[Received Date]={"$(vYesdate)"}>}[Received Date])

where vYesdate is variable, "Let Date(Today()-1,'YYYY-MM-DD')"

its bit strange 4 days back it was returning Yesterday's date now its returning -

Could any one help me to fix this 😞

Thank you in advance.

Regards,

Rekha J. V.

5 Replies
OmarBenSalem

Maybe you have more than one received date for your selected date(yesterday)

Try :

Date(aggr(Max({$<[Received Date]={"$(vYesdate)"}>}[Received Date]),[Received Date]))

Anonymous
Not applicable
Author

No Still getting "-"

shraddha_g
Partner - Master III
Partner - Master III

can you check data in [Received Date] whether It includes yesterday's date.

Also check what today()-1 is returning?

petter
Partner - Champion III
Partner - Champion III

vYesDate will calculate to yesterday in relation to the "day of last finished data load". It will not be yesterday as of your current clock.

Today() without a parameter is the same as Today(0):

http://help.qlik.com/en-US/sense/November2017/Subsystems/Hub/Content/Scripting/DateAndTimeFunctions/...

If you want it to be today according to clocktime your will have to use Today(1) or Today(2) depending on where you do the actual calculation. In the load script or in the app.

petter
Partner - Champion III
Partner - Champion III

I would do like this:

Only({$<[Received Date]={"=Date(Today()-1,'YYYY-MM-DD')"}>}[Received Date])


or


SET vYesDate = Date(Today()-1,'YYYY-MM-DD') ;