Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

TwoMonth period cross

Colleagues, good day!

Is in QV any solution to make field with two moth periods, in which every month includes two periods?

I need to make field (by date field) with such values:

Jan-Feb

Feb-Mar

Mar-Apr

Apr-May

May-Jun

Jun-Jul

Jul-Aug

Aug-Sep

Sep-Oct

Oct-Dec

Dec-Jan

Many thanks for every advice!

Andrey.

9 Replies
MK_QSL
MVP
MVP

Have you got date field?

Create something like below..

Dual(Month(Date) & '-' & Month(AddMonths(Date,1)) ,Month(Date)) as YourDualMonthField

sunny_talwar

Is this This Month - Next Month or Last Month - This Month?

Anonymous
Not applicable
Author

Yes. I have date field.

Field YourDualMonthField , example (Jan-Feb) get only January dates, but i need Jan & Feb dates

Thanks.

Anonymous
Not applicable
Author

yes

sunny_talwar

Which one of the two?

ThisMonth - NextMonth

or

LastMonth - NextMonth?

Anonymous
Not applicable
Author

It must be not flag, but field with two month period names.

For example, today date (09.02.2016) must include Jan-Feb and Feb-Mar.

MK_QSL
MVP
MVP

Something like below?

Data:

Load * Inline

[

  Date, Sales

  10/01/2016, 100

  25/02/2016, 120

  12/03/2016, 90

];

DualMonth:

Load Distinct Date, Month(Date) & '-' &Month(AddMonths(Date,1)) as Flag Resident Data;

Concatenate

Load Distinct Date, Month(AddMonths(Date,-1)) & '-' &Month(Date) as Flag Resident Data;

Anonymous
Not applicable
Author

It doesn't work.

jonathandienst
Partner - Champion III
Partner - Champion III

Your dates are text values, not proper date values. Convert them to proper numeric date values and then Manish's logic will work.

When you load the dates, you need something like:

     LOAD

          ...

          Date#(Date, 'dd/MM/yyyy') As Date,

          ...

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