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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
risabhroy_03
Partner - Creator II
Partner - Creator II

Create a field

I have a field named [Fiscal Year]  which has values like 2019,2020,2021....

Now I need to create a new field named [New_ASDT] which should be equal to 31-March-(Fiscal Year).

That implies my [New_ASDT] should store like 31/03/2019, 31/03/2020

 

Please help me

2 Replies
anat
Master
Master

LOAD *,'31/03/'&year as mon;
LOAD Year(today())-recno() as year,RecNo() AutoGenerate 10 ;

AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

How about using a YearEnd function.

CalendarMaster:
LOAD
Date(InvoiceDate) AS InvoiceDate,
Year(InvoiceDate) AS Year,
'Q' & Ceil(Month(InvoiceDate) / 3) AS Quarter,
Monthname(InvoiceDate) As Month,
YearEnd(InvoiceDate,0,4) as YearEndDate,
Day(InvoiceDate) As Day,
Week(InvoiceDate) As Week;
Load Date(MinDate + IterNo() -1 ) AS InvoiceDate While (MinDate + IterNo() - 1) <= Num(MaxDate);
Load
'01/01/2016' AS MinDate,
'12/31/2021' AS MaxDate
AutoGenerate 1;

 

AshutoshBhumkar_0-1638775466056.png

 

Hope this helps.

Thanks,
Ashutosh