Overview
Background
The document YoY/MoM Growth (Quick Calculation) introduces how to calculate the year-on-year (YoY) and month-on-month (MoM) growth of a chart with date fields. However, it is inconvenient to view the complete data of a month or a year.
This document introduces how to filter out and display the YoY and MoM growth of a specified year.
Preview
The YoY and MoM growth of 2017 can be displayed completely with a year-month interval filter component, as shown in the following figure.
Implementation Method
If you directly add a filter and bind related fields to it, the YoY and MoM growth data will be lost, as shown in the following figure. Because directly filtering out the result of 2017 excludes the data in 2016, which is needed in the YoY/MoM calculation. Therefore, this document introduces another way to meet this purpose.
Procedure
Adding a Parameter
Add a time-type parameter on the component editing page. This parameter is used to be bound to the filter component in subsequent steps.
Adding a Filter Component
Follow the procedure in the document YoY/MoM Growth (Quick Calculation) to make a component. Add this component and a year-month interval filter component to the dashboard.
Go to the filter setting page and bind the parameter created in section "Adding a Parameter" to the filter component to assign actual values to the parameter. Do not add any field to the filter component.
Adding Filter Condition to the Dimension Field on Dashboard Editing Page
1. Choose ICON > Filter to filter the Contract Signing Time field.
2. Click Add Condition and set Contract Signing Time to In the year-month interval of the parameter. In this way, if you set the year-month interval filter as from January to December 2017, the Contract Signing Time field will automatically filter out the data during this interval.
Adding Filter Condition to the Dimension Field on Component Editing Page
This section introduces how to set the filter condition for YoY/MoM growth in the form of a line chart.
Go to the component editing page, select the Contract Signing Time field, and choose ICON > Filter. Click Add Condition and set Contract Signing Time as In the year-month interval of the parameter.
Demonstration
In this way, the YoY growth data will not be lost if you filter out the result after January 2017.
For demonstration of the dashboard in this document, see section "Preview".