Skip to main content

Implementation of Non-Full Month Year-over-Year and Month-over-Month Comparison

Scenario

The report displays data for each month and year-over-year/month-over-month data. When filtering past months, it shows the comparison between the entire month and the corresponding period. However, the current month hasn't ended yet. For example, today is February 8th, 2023, and you want to compare data from February 1st to 7th, 2023 with data from February 1st to 7th, 2022. If you directly use the year-over-year/month-over-month in advanced calculations, it will directly compare with the entire month of last year, making the calculated growth rate very unreasonable. So we hope that past months are compared as full months, while the current month is not compared as a full month, only comparing data within the same date range of the corresponding period.

image.png

Implementation Method

  1. Drag the numerical field that needs to be calculated (using [Amount] as an example here) into "Numerical" three times, naming them Current Month Amount, Same Period Last Year, and Growth Rate respectively. Set year-over-year/month-over-month for Same Period Last Year and Growth Rate, and select "Comparison Value" and "Growth Rate" respectively in "Numerical Settings". Here you can see the current date range and comparison date range;

image.png

  1. Drag the date field into the filter bar and select the quick range "This Month to Yesterday";

image.png

  1. Save the card and return to the page, create a new date filter, the default value can be customized, or you can choose the same time period as in the card. The linkage field should be the same as the date field set in the year-over-year/month-over-month field in the card;

image.png

  1. After that, you can select which time period on the page filter to compare and view the corresponding period value and growth rate.

image.png