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

Need a Maximum Date in Fiscal Calender

Hi Friends,

I am having calendar  up to date 1/3/2021

I want to Display Maximum Date in Calendar

I am using

Load

         Year ,

         Max(Date(Date))     as  MaximumDate

from

xyz.com

groub by Year;


I am getting out put as Below Mentioned Image


MaxDate.PNG


I want to display only 1/3//2021

Can you guys help me with this

Thank you,

Satya

3 Replies
sunny_talwar

I guess you just need this then:

LOAD Date(Max(Date)) as MaximumDate

from xyz.com;

harsh44_bhatia
Creator
Creator

Hello Satya,

The problem with your approach is that the logic scans each row, since here a row is individual group set a date is max for each row, hence you get back all your records.

approach suggested bu Sunny T is good.

you can also try the following as well since you may have many more columns in your table

maxmindate:

load

DATE(min(FieldValue('dateField',RecNo()))) as minDate,

DATE(max(FieldValue('dateField',RecNo()))) as maxDate

AutoGenerate FieldValueCount('dateField');

sathishkumar_go
Partner - Specialist
Partner - Specialist

Hi

In your script, You have used Year  and Max(Date) and groupby Year sothat in each year it is showing the maximum date.

If you want only maximum date of the entire calendar?

then try this,

load
Max(Date(Date))     as  MaximumDate

resident TableName;

--Sathish