Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

belgarathza
New Contributor II

Custom Reporting Period

Hi,

I'm new to the qlikview environment :-) I would like to find out if it is possible to have a custom reporting period in Qlikview as a selection? Meaning that if the reporting period for the customer was the 18th of every month to the 17th of the next month, how would we be able to show it as a single selection. Ex. 18 January 2012 to 17 February 2012 would show as Reporting month February.

Thanks in advance,

Terence

1 Solution

Accepted Solutions
MVP
MVP

Re: Custom Reporting Period

Hi

I suggest that you incorporate the reporting period number into your master calendar. Then you can add a list box for reporting period or use reporting period as a dimension.

In your case, add something like one of the following lines to the load of the master calendar.

     Month(Date) + If(Day(Date) > 17, 1, 0) As ReportingPeriod,

or

     Year(Date) & Num(Month(Date) + If(Day(Date) > 17, 1, 0), '00') As ReportingYM,

If you are not using a master calendar, there are many postings on that topic. Search for "master calendar" for more information. A minimal master calendar could be:

LOAD Date(Date) As Date,

          Month(Date) As Month,

          Year(Date) As Year,

          Month(Date) + If(Day(Date) > 17, 1, 0) As ReportingPeriod

;

LOAD $(vMinDate) + RecNo() - 1 As Date

AUTOGENERATE $(vMaxDate) - $(vMinDate) + 1;

Where vMinDate and vMaxDate are the date range to use (in number format). Rename the field Date to refer to the transaction or fact date in your model.

Regards

Jonathan

Corrected last LOAD with RecNo() in place or RowNo() and value of 18 with 17

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

Re: Custom Reporting Period

Hi

I suggest that you incorporate the reporting period number into your master calendar. Then you can add a list box for reporting period or use reporting period as a dimension.

In your case, add something like one of the following lines to the load of the master calendar.

     Month(Date) + If(Day(Date) > 17, 1, 0) As ReportingPeriod,

or

     Year(Date) & Num(Month(Date) + If(Day(Date) > 17, 1, 0), '00') As ReportingYM,

If you are not using a master calendar, there are many postings on that topic. Search for "master calendar" for more information. A minimal master calendar could be:

LOAD Date(Date) As Date,

          Month(Date) As Month,

          Year(Date) As Year,

          Month(Date) + If(Day(Date) > 17, 1, 0) As ReportingPeriod

;

LOAD $(vMinDate) + RecNo() - 1 As Date

AUTOGENERATE $(vMaxDate) - $(vMinDate) + 1;

Where vMinDate and vMaxDate are the date range to use (in number format). Rename the field Date to refer to the transaction or fact date in your model.

Regards

Jonathan

Corrected last LOAD with RecNo() in place or RowNo() and value of 18 with 17

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

Re: Custom Reporting Period

Example attached

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
belgarathza
New Contributor II

Re: Custom Reporting Period

Hi Jonathan :-)

Thank you very much.I'm busy adding it in :-)

Regards

Terence

Community Browser