Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Comparing current and previous month

Hi All,

New to Qlik and struggling to compare data across months, specifically how to get the most recent month.

I want to show the amount of 'incidents' that have occurred in the most recent month, as well as this compared to the month prior.

The ultimate goal would be some conditional formatting that showed if the current months incidents were greater than previous and if so, by how many ( # or %)

I have followed some instructions to create a Master Calendar to have more control over dates but am still having trouble with MaxDates and MaxDates - 1 etc

Any help would be greatly appreciated

Bestm

Josh

2 Replies
sunny_talwar

Check this link out:

The As-Of Table

Anonymous
Not applicable
Author

Hi Sunny,

Thanks for providing this link.

I think im missing something really basic.

I just need to present the current months incidents and last months incidents. I have my Master calendar so I believe it theory all I need to do was to use the Max Date/ Max Month and Max Date/ Max Month -1 function.

Looking on forum posts ive tried all of the following but none has worked.

//Count(Incident)

//Count( {$<Year = {$(#varMaxDate)}>} Incident )

//=Count({<Month={$(=Max(Month)-1)}>} Incident )

//Count({<Month={$(=Max(Month)-1)}>} Incident)

//Count({<MonthName={"$(=Month(Max(Date)-1))"},Year={"$(=(Year))"}>}Incident)

//Count({$<MonthYear={$(=Only(MonthYear)-1)}>}Incident)

//Count({<Month = {$(MONTH =(MAX(Date))}>} Incident

//Count({<Year = {$(MAX(Year))},Month = {'$(=MONTH(MAX(Date)))'}>}Incident)

Is it possible for you to look into my QVF and see where Im going wrong ?

Best,

Josh