Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikmpate0
Creator II
Creator II

Display Current month and rolling month data

Hi,

I'm trying to display Jan- Dec for each year but because this is too long I would like to display it in quarterly months.So it all fits on one page.

Also on the same page I want to display the current month too.   I want to use this eventually on nprinting.

I have tried different set analysis and expressions but still not getting what I want, help would be appreciated

examples used:- =Sum({$<Month= {"$(=Month(Today()-1))"}>}qty)

If ( Creationdate, = Month(Addmonths(Today(),-1)),'Y','N')    all flags return 'N'

11 Replies
Kushal_Chawda

create the calendar script like below

MinMax:

LOAD min(Date) as MinDate,

    max(Date) as MaxDate;

LOAD FieldValue('Creationdate',RecNo()) as Date

AutoGenerate FieldValueCount('Date');

let vMinDate = Peek('MinDate',0,'MinMax');

let vMaxDate = Peek('MaxDate',0,'MinMax');

Calendar:

LOAD *,

    Year(Creationdate) as Year,

    MonthName(Creationdate) as MonthYear,

    QuarterName(Creationdate) as QuarterYear;

LOAD date($(vMinDate) +IterNo()-1) as Creationdate

AutoGenerate 1

While $(vMinDate) +IterNo()-1 <= $(vMaxDate) ;

DROP Table MinMax;

Now you can use QuarterYear as your required month format

qlikmpate0
Creator II
Creator II
Author

if I'm displaying the current month, can I have YTD totals at the bottom, for example I have data for Jan-Jun.

I display Jun sales in summary table,  but I want to also display total sales YTD on a separate line as shown below:example output.JPG

how can I do that with set analysis?