Announcements
cancel
Showing results for
Did you mean:
Creator III

## How to find current & next month sales based on 4-4-5 calender dates.

Hi All,

I created the 4-4-5 calender based on my available dates. now I want to calculate  the current month sales and next month sales based on this 4-4-5 calender dates.

let say for example for current month start from 27/01/2019 to 23/02/2019.

and next month start from 24/02/2019 to 30/03/2019.

can any one please suggest. it is very very urgent requirement.

Regards

PC

Labels (4)

• ### QlikView scripting

4 Replies
Creator III
Author

I think the month-comparison is quite similar like by a normal calendar. The single dates are only needed to define weeks, months and so on but the comparison happens then on those created period-fields. Important for such a logic is of course to have a real 4-4-5 calendar within the datamodel. An example of it could you find here: Recipe-for-a-4-4-5-Calendar and various examples for calculations (comparisons, rolling-calculations and so on) could you find on the end of this posting: How-to-use-Master-Calendar-and-Date-Values.

- Marcus

Creator III
Author

Hi Marcus,

thank you for response.You are right,Month -comparision is simalr to normal calender  but the logic is quite different when we have future dates and when we are dealing with 4-4-5 calender.

my straight forward quetion is, what is the expression for finding current month sales according to 4-4-5 calender.

as I said my dates are captured as for

feb is 27/01/2019 to 23/02/2019,

Mar is 24/02/2019 to 30/03 /2019 and so on..................up to 2024(year)

I have Month, quater, year,yearmonth, every field in my 4-4-5 calender as well as normal calender.

I need to find, current month, next month, more than next month and less than current month sales.

Regards

PC

It's not really clear to me what should be an essentially difference between a normal calendar and a 4-4-5 calendar. Both could contain dates from the past and the future and you could just refer to their various period-fields (especially if the various measures like MTD or LMTD and also the workingdays are flagged within the calendar) to make any kind of comparison.

Not reliable/possible is the use of date-functions which expect normal calendar-dates as parameter like addmonths(). But they aren't needed for the above mentioned comparisons.

- Marcus

Community Browser