Comparing This Year to Last Year with Charts

By - Jun 23, 2015

In this article, we will introduce how to use one filter to control two charts that display the same period within two different years.

Year Over Year Comparison

The key is application variable. In this particular case, we need to derive week information from the Fiscal Calendar filter selection using application variables, and then use Lag function over the variable to define the time range on the X axis in the chart.

We defined two standard application variables.

Application Variables

Here is the definition for the Week of Selected Day.

And here is the definition for the Week of Selected Day (Last Year).

The axis definition for these two charts are the same.

Kepion BI Modeler

On the column, we have two hierarchies.  The Fiscal Calendar is set to All.  And we use Range to define the Fiscal Week.

Kepion BI Modeler

Since the chart displays past 12 weeks, we can set up the range picker as shown below.

Define Week Range

After adding proper members to the column and filters, we will get the form ready.

Then we can create chart over the form.

Follow the same steps to create the chart for last year. The only difference is to use ${Week of Selected Day (Last Year)} when defining the Fiscal Week hierarchy on the Row.

And this is the chart you will get.


Facebooktwitterlinkedinmail