Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Date Format & Merging Columns

Hi

  1. How do i change a date format from say, Jan 2012 to Jan-12
  2. How do i merge columns.  I have the table below with each column showing Forecast, however i want to have a main heading called "Forecast" and the months below. 
    Forecast - Jan 2012Forecast - Feb 2012Forecast - March 2012

kind regards

Nayan

1 Solution

Accepted Solutions
MVP
MVP

Re: Date Format & Merging Columns

Hi

These are the expressions you need

='Forecast Sales Qty  ' & Date(addmonths(max([Trans Date]), 1), 'MMM-YY')

='Forecast Sales Qty  ' & Date(addmonths(max([Trans Date]), 2), 'MMM-YY')

='Forecast Sales Qty  ' & Date(addmonths(max([Trans Date]), 3), 'MMM-YY')

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
6 Replies
thomas_skariah
Contributor III

Re: Date Format & Merging Columns

Hi Nayan,

You can try the following code.

='Forecast-' & Date#(date(YourDateField,'MMM-YY'))

Regards,

Tom

Not applicable

Re: Date Format & Merging Columns

Hi Thomas

Thank you for your feedback. . I've used your formula, but it did not work.  Im new at Qlikview, and below the table is the scripting for the columns that was created for us. 

Forecast Sales Qty  Oct-2012Forecast Sales Qty  Nov-2012Forecast Sales Qty  Dec-2012

='Forecast Sales Qty  ' & month(addmonths(max([Trans Date]) ,1)) & '-' & year(addmonths(max([Trans Date]) ,1))

='Forecast Sales Qty  ' & month(addmonths(max([Trans Date]) ,2)) & '-' & year(addmonths(max([Trans Date]) ,2))

='Forecast Sales Qty  ' & month(addmonths(max([Trans Date]) ,3)) & '-' & year(addmonths(max([Trans Date]) ,3))

kind regards

Nayan

thomas_skariah
Contributor III

Re: Date Format & Merging Columns

Hi Nayan,

You can try this one

='Forecast Sales Qty  ' & month(addmonths(max([Trans Date]) ,1)) & '-' &date(date#(max(Year([Trans Date])), 'YYYY'),'YY').

Regards,

Tom

Not applicable

Re: Date Format & Merging Columns

Hi Tom

Apologies for the dealyed reply.  The result is as follows where there year has fallen away:

Forecast Sales Qty  Oct-
MVP
MVP

Re: Date Format & Merging Columns

Hi

These are the expressions you need

='Forecast Sales Qty  ' & Date(addmonths(max([Trans Date]), 1), 'MMM-YY')

='Forecast Sales Qty  ' & Date(addmonths(max([Trans Date]), 2), 'MMM-YY')

='Forecast Sales Qty  ' & Date(addmonths(max([Trans Date]), 3), 'MMM-YY')

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable

Re: Date Format & Merging Columns

Hi Jonathan

Thank you for you help.  It worked.  On my 2nd query on how to merge columns, is there a way this can be done?

kind regards

Nayan

Community Browser