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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
TinaHensel
Contributor III
Contributor III

Data Editor | Date comparison not working

Hello all,

I am currently dealing with the following problem: I have a .qvd file from which I extract the maximum date:

LOAD max(%ID_ZEIT_TAG_SK) AS maxday
FROM [$(v_QVD_Path)/daten.qvd](qvd);

 

The result is 44452. But when comparing this value with the current date in the data editor, the following query is not working:

 

IF num(maxday) = num(today()) then

trace LOAD!;

end if;

 

But if I compare these two values inside a table, it is working:

TinaHensel_0-1631521545219.png

 

 

Does anyone have a solution?

Thank you!

Best regards

Tina

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Your mxday is a field here and you have to get the value from this field into a variable and then it should work as expected. Try like:

Load Max(....  as maxday...;

Let vMaxDay=Num(Peek('maxday'));

IF $(vMaxDay) = num(today()) then

View solution in original post

1 Reply
tresesco
MVP
MVP

Your mxday is a field here and you have to get the value from this field into a variable and then it should work as expected. Try like:

Load Max(....  as maxday...;

Let vMaxDay=Num(Peek('maxday'));

IF $(vMaxDay) = num(today()) then