Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Time Chart Wizard - 3 Month Comparison

I am using the time chart wizard to do a 3 month comparison on sales. Each month I want to compare the last 3 months to the previous 3 months. This works fine if I am at the end of a quarter, but the first month of the next quarter it does not work properly.

Fiscal Year Starts: July - using the comparison by month for 3 months

Result: 1. It only compares Sept - July vs June - April or 2. Compares Oct-Dec vs Sept - July

Desired outcome: Compare Oct - Aug vs July - May. Each month it looks back at the last 3 months even if it is in the middle of a quarter.

Thanks

1 Reply
Miguel_Angel_Baeyens

Hello,

Take the following example script

DateRange:LOAD Ceil(Rand() * 5) AS ID, Date(Date('01/01/2010') + Ceil(Rand() * 300)) AS Date, Month(Date(Date('01/01/2010') + Ceil(Rand() * 300))) AS Month, Ceil(Rand() * 10) * 1000 AS AmountAUTOGENERATE 200;


Now create a new chart, pivot table, and two expressions

Sum(Amount)


to get the current month amount and

RangeSum(Above(Sum(Amount), 1, 3))


that will return the last three months aggregation.

Hope that helps