Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.


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.

Not applicable

How to start a monthly chart not in January

Hello, and thanks in advance for your support.

My company has a tax year from July to June, so I need that any monthly chart will start in July or if the chart is in weeks,  in the week 27.  How to organize this?.

Best Regards

2 Replies
Not applicable

Re: How to start a monthly chart not in January

You can do this by defining a master calendar table already in the script. In the following scriptlet you will find one way to define your fiscal year:

Let vStartOfFiscalYear = 7 ; // July (7) is the first month of the fiscal year

Load distinct
Month(TransactionDate) as Month,
Year(TransactionDate) as Year,
Date(MonthStart(TransactionDate),'MM/YYYY') as YearMonth,
Dual(Month(TransactionDate), Mod((Month(TransactionDate)-$(vStartOfFiscalYear)),12)+1) as TaxMonth,
Year(AddMonths(TransactionDate,1-$(vStartOfFiscalYear))) & '/' & Year(AddMonths(TransactionDate,13-$(vStartOfFiscalYear))) as TaxYear
Load Date(MakeDate(2011)-1+recno()) as TransactionDate
autogenerate 732;

You will need to have a similar load statement, but you should probably consider loading everything from the transaction table:

Load distinct

resident TransactionTable;

Not applicable

How to start a monthly chart not in January

Here is another way:

Add this to your calender script:

JOIN (Master_Calendar)



If(Week < 27, Week +26 , Week -26)  as WeekCount

Resident Master_Calendar;

Now you have a field (WeekCount) which start counting at week 27
If you sort on Expression SUM(WeekCount) it get the result you want.

Good Luck,

PS If you dont have a Week field add the following line to your script:

week(DateField)                                                                                 AS Week,