Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load script make of two fields one


Hello together,

i Need your help. I have two fields mont and year. How I get this two fields in one field with load script?

Thanks

Jörn

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Load

          MakeDate(YearField, MonthField) as Date  // This will work if month is numerical

          Date(Date#(YearField&MonthField&'1', 'YYYYMMMD')) as Date  // If month is like - jan. feb...

View solution in original post

5 Replies
tresesco
MVP
MVP

Try like:

Load

          MakeDate(YearField, MonthField) as Date  // This will work if month is numerical

          Date(Date#(YearField&MonthField&'1', 'YYYYMMMD')) as Date  // If month is like - jan. feb...

PrashantSangle


Hi,

Try this,

Month &'-'& Year as New_Month_Year

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
ashfaq_haseeb
Champion III
Champion III

Hi,

try below

Load

Day,

Month,

Year,

Date,

Month&'-'&Year as MonthYear

from test.qvd;

Regards

ASHFAQ

hannan_t
Partner - Contributor III
Partner - Contributor III

Try this in your script :

MonthField&'-'&YearField as MonthYear

Result will be something like this:

Aug-2014

MayilVahanan

Hi

Its based on your requirement.

MakeDate(YearField, MonthField, 01) as Date  Gives FirstDayofMonth respective year.

YearField&'-'&MonthField as YearMonth  Gives ex: 2014-08 or 2014-Aug

MonthField&'-'&YearField as  MonthYear Gives ex: 08-2014 or Aug-2014

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.