Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
MahaMohamed
Contributor
Contributor

Date Variable

I have a QV report with sales data from Jan 2017 till May 2024.

I need to create a variable to get the max date, it always gives me " 31/12/2023 "

I tried also to create a variable for max year and it gave me 2023 

the variables cannot read any value related to 2024 however the report itself read 2024 data normally 

Can anyone help in this ?

Labels (1)
1 Reply
BrunPierre
Partner - Master
Partner - Master

Ensure the date field is properly formatted as date. Reformat them if necessary.

Date(Date#(SalesDate, 'DD/MM/YYYY'), 'DD/MM/YYYY') as SalesDate

LET vMaxDate = Date(Max(SalesDate));