Month over Month comparison using parameters

To perform arbitrary month over comparison based on user selections will require the use of parameters. If you are not familiar with parameters please watch online training here: 08. Intro to Parameters

In another posts we explored using date filter parameters to create 3 visuals each comparing different time ranges previous 2 weeks, current 2 weeks, future 2 weeks: How to manipulate time filter using parameters for time comparisons

In this article we will build single visual that compares two arbitrary months based on user selections.

  • We will setup 2 filter widgets at the top of the dashboard from which users can select the months to compare.

  • The tabular visual will be configured to use the parameters set by the two filter widgets. Some of the expressions:

    sum(if([month-year]='<<month1_param>>',[sales],0)) as '<<month1_param>>'  
    sum(if([month-year]='<<month1_param>>',[sales],0)) - sum(if([month-year]='<<month2_param>>',[sales],0)) as 'Delta' 
  • The final result is a dashboard as follows:

Here is a step by step video showing the full build out:

1 Like

Instead of tabular, we can change the visual to multi-line chart that more easily trends the comparison between the two months.

Here’s an example where we compare daily sales across the two months:

1 Like