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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
dmohanty
Partner - Specialist
Partner - Specialist

How to create a Date field from Quarter and Month?


Hi All,

I have a table where two fields are there : Quarter (Q1, Q2, Q3, Q4) and Month (Jan 2013 - Dec 2013).

How can I create a Date and Day field at script level to contain all values?

Please suggest.

Regards!

13 Replies
tresesco
MVP
MVP

Since your one table data is date-wise and the other one month-wise, it would be a good idea to link them using a month field.

Create a month field from your second table(OrderBooking) like:

Load

          *,

          Month(Date Of Approval) as Month

From <>;

And then From first table(Revenue), like:

Load

          *,

          Month(Date#(Month, 'MMM-YY')) as Month

From <>;

Note: You have to take care of sunthetic keys for your data separately.

dmohanty
Partner - Specialist
Partner - Specialist
Author


Hi Ravi Kumar,

If the Date in your table above has values like this: Jan-13, Feb-13....Dec-13

How can the Date field calculated (in DD-MMM-YYYY format)?

I mean what changes has to be done in your script?

Not applicable

Use this

 

Date(Makedate(SubField(Date,'-',2),SubField(Date(Date#(Date,'MMM-YYYY'),'MM-YYYY'),'-',1)),'DD-MM-YYYY') as Date

muniyandi
Creator III
Creator III

Hi,

Kindly verify my attachment file.

Regards,

Muni