YOY Ratio of Accumulated Sales as of Each Month

  • Last update:  2023-08-08
  • Overview

    Background

    The accumulated sales as of each month every year can be calculated through the quick calculation function in FineBI.

    But in daily work, there is a need to compare the year-on-year (YOY) ratio of accumulated sales as of each month, which cannot be achieved through quick calculation. In this case, the DEF function can come in handy.

    Preview

    Calculate the YOY ratio of accumulated sales as of each month and the result is shown in the following figure.

    As you can see, the accumulated sales volume as of June 2013 was USD 1.1657 million, while that as of June 2014 was USD 1.3855 million, with a year-on-year increase of 18.86%.

    For online preview, click YOY Ratio of Accumulated Sales as of Each Month.

    1.png

    Procedures

    Adding Data

    Sample data: Supermarket Sales Data.xlsx

    Create a subject and upload the sample data, as shown in the following figure.

    2.png

    Processing Data

    To sum up monthly sales in ascending order for year-on-year comparison, you can extract Year and Month during data processing.

    1. Click Get Time to extract Year from Time of Order.

    3.png

    2. Click Get Time to extract Month from Time of Order.

    4.png

    3. Click Save All and Update.

    Creating a Component

    Drag Time of Order into Dimensions twice and change the group way to Year and Month respectively, as shown in the following figure.

    5.png

    Calculating the Accumulated Sales as of Each Month

    Add a calculation indicator to sum up the sales as of the current month each year. The filter condition is Year=EARLIER(Year), Month<=EARLIER(Month), as shown in the following figure.

    Through this formula, the result of March 2014 is the accumulated sales in January, February, and March.

    6.png

    Formula
    DescriptionFunction Reference

    SUM_AGG(Sales Volume)

    Sum up the total sales volume.

    SUM_AGG

    DEF_ADD(SUM-AGG(Sales Volume),[],[Year=EARLIER(Year),Month<=EARLIER(Month)])

    Calculate the accumulated sales as of each month.

    • Specified dimension: /.

    • Analysis area dimensions: Time of Order (group way: Year) and Time of Order (group way: Month).

    • Filter condition: Year=EARLIER(Year), Month<=EARLIER(Month).

    /

    Calculating the Accumulated Sales as of Each Month Last Year

    To calculate the accumulated sales as of each month last year, you only need to change the filter condition to Year=EARLIER(Year-1),Month<=EARLIER(Month), as shown in the following figure.

    7.png

    Formula
    DescriptionFunction Reference

    DEF_ADD(SUM-AGG(Sales Volume),[],[Year=EARLIER(Year-1),Month<=EARLIER(Month)])

    Calculate the accumulated sales as of each month last year.

    • Specified dimension: /.

    • Analysis area dimensions: Time of Order (group way: Year) and Time of Order (group way: Month).

    • Filter condition: Year=EARLIER(Year-1), Month<=EARLIER(Month).

    /

    Calculating the YOY Increase Ratio

    YOY increase ratio = accumulated sales as of each month / accumulated sales as of each month last year - 1, as shown in the following figure.

    8.png

    Formula
    DescriptionFunction Reference

    Accumulated Sales as of Each Month/Accumulated Sales as of Each Month Last Year-1

    Calculate the YOY increase ratio of the accumulated sales as of each month.

    /

    IF(ISNULL(Accumulated Sales as of Each Month Last Year),"",Accumulated Sales as of Each Month/Accumulated Sales as of Each Month Last Year-1)

    Determine if Accumulated Sales as of Each Month Last Year is null: if so, the formula returns null; if not, the formula returns the YOY ratio.

    IF

    Creating a Group Table

    Set the chart type as Group Table, and drag related fields into the analysis area. Set the group way of the first Time of Order field as Year, and the second as Month, as shown in the following figure.

    You can change the Numeric Format of fields related to sales volume to Ten Thousand, and that of YOY Ratio to Percentage.

    9.png

    Through previous steps, the component showcasing the YOY ratio of accumulated sales as of each month is created.

    Demonstration

    For the demonstration of this component, see section "Preview".


    附件列表


    主题: Advanced Data Analysis
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy