Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month on month figures

Hi All,

This isn't a technical question, more to ask if people have had the same requirement from their business owners and how they may have addressed the problem.

We are comparing sales figures for yesterday, vs the same day the previous week, and the same date the previous month. Comparing to the previous week is fine - just take 7 days off and you get Monday vs Monday. Take a month off though, and you may get Monday vs Sunday - which obviously give misleading data - in our business you'd expect the Sunday sales to be way less than a Monday.

What the business are asking for is a way to compare with the equivalent day the previous Month. i.e, if yesterday was the first Monday in the month, compare with the first Monday of the month last month.

I'm really not sure how to accomplish this,

Any advice/pointers would be much appreciated!

Thanks,

Rory.

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

I never experienced a similar request, I think you should prepare a personalized calendar to assign the first, second ... dayweek in each month. In this way you could compare as you need, only a question ... is this a complete rule?

Joaquin_Lazaro
Partner - Specialist II
Partner - Specialist II

Hi Rory:

Look at QlikView-Help, there are some functions about dates, perhaps one of these could help you:


1) DayNumberOfYear

2) MonthsStart

3) MonthsEnd

4) YearStart

5) YearEnd

6) AddMonths


Good luck!!

Joaquin_Lazaro
Partner - Specialist II
Partner - Specialist II

Hi again:

Add a new field to you master-calendar table NUM(yourdate),  and you can create expresions like

1) Today: sum( {< today selection >} sales)

2) LastWeek = Today - 7   sum( {< last week selection >} sales)

3) LastMonth  = AddMonths(Today(), -1) sum( {< last month selection >} sales)

Of course yo have to "improve" my suggestions