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

is there a typo, try below

If ( Creationdate >= monthstart(Addmonths(Today(),-1))  and Creationdate <=monthend(Addmonths(Today(),-1)),'Y','N')

mangalsk
Creator III
Creator III

Hello,

You have a field called Month so you can write below, you are comparing date with month which is not possible

if(Month=MonthName(Today()),,'Y','N')    all flags

qlikmpate0
Creator II
Creator II
Author

Hi Kushal,

This doesn't give me any rows with the value 'Y' which are in the previous month. all the rows are 'N'

qlikmpate0
Creator II
Creator II
Author

I have tried it with month too but still not good

Kushal_Chawda

check the Date format, may be it's in text, you need to first convert it in number

If ( date(date#(Creationdate,'DD/MM/YYYY')) >= monthstart(Addmonths(Today(),-1))  and date(date#(Creationdate,'DD/MM/YYYY')) <=monthend(Addmonths(Today(),-1)),'Y','N')


Assuming that your Date format is 'DD/MM/YYYY'. change the format as per the data

mangalsk
Creator III
Creator III

Please see attached it is working , i have done in text box for reference

qlikmpate0
Creator II
Creator II
Author

Ok the format of date was one of the issues. thank you so much for your help, but how can I display the quarterly months eg Jan-Mar, Apr-Jun, Jul-Sep,& Oct-Dec?

qlikmpate0
Creator II
Creator II
Author

Thank you Mangal, I also need the Quarterly months to be displayed 

mangalsk
Creator III
Creator III

Dear Mina,

Please create calendar so that it will be easy for you to calculate as per your need on different views.

Currently you can do if( num(Month(CreationDate))>=1 and num(Month(CreationDate))<=3,'Q1',

if( num(Month(CreationDate))>=4 and num(Month(CreationDate))<=6,'Q2',

if( num(Month(CreationDate))>=7 and num(Month(CreationDate))<=9,'Q3',

if( num(Month(CreationDate))>=10 and num(Month(CreationDate))<=12,'Q4')))) as Quarter or as per your need please change months