反馈已提交

网络繁忙

Analysis of Sales Gap

  • Last update:  2023-04-19
  • Overview

    Background

    You want to compare the value of a category with other categories.

    For example, you want to calculate the sales gap between children's ornament and other categories.

    Preview

    Select Children's ornament in the filter component, and you can see the sales gap between children's ornament and other categories displayed in the right chart.

    Procedures

    Adding Data

    Create a subject and find the built-in data table named Store sales statistics in Public Data.

     QQ图片20230413134836.png

    Creating Components

    Formula: sales gap = sales of other categories - sales of the chosen category

    1.     Adding a Parameter

    You need to add a parameter named Chosen Category, so that you can choose a category in the filter component.

     QQ图片20230413135014.png

    2.     Calculating the Sales of Chosen Category

    Add a calculation indicator to calculate the sales of chosen category.

     QQ图片20230413141006.png

    Formula

    Description

    Help Document

    DEF(SUM-AGG(Sales   Volume),[],[Category description=Chosen Category])

    Aggregate calculation: SUM_AGG(Sales Volume)

    • Specified dimension: No.

    • Filter condition: Category description=Chosen Category

    Calculate the total sales of chosen categories.

    DEF

    3.     Calculating the Sales Gap

    Formula: the sales gap = each category's sales - the sales of the chosen category

    Add a calculation field like this:

     QQ图片20230413141009.png

    Formula

    Description

    Help Document

    DEF(SUM_AGG(Sales   Volume),[Category description])

    Aggregate calculation: SUM_AGG(Sales Volume)

    Specified dimension: Category description

    Calculate each category's sales.

    DEF

    DEF(SUM_AGG(Sales   Volume),[Category description]) - Sales of Chosen Category

    Calculate the sales gap between the chosen category and other categories

    /

    4.     Making a Column Chart

    Set the chart type as Partitioned Column Chart, and drag in fields like this:

     QQ图片20230413141255.png

    Drag the fields Sales Volume and Sales Gap to Label, and modify their number format into Ten Thousand.

    Making a Dashboard

    1.     Adding Components

    a. Go to the dashboard editing interface, and drag the created component.

    b. Drag the filter component to the interface.

     QQ图片20230413141523.png

    2.     Editing the Text List Component

    a. Add the binding parameter Chosen Category to the component.

     QQ图片20230413141645.png

    b. There are two ways of adding options for selection.

    • Click Custom Value List to allow manual input.

    • Add fields from other tables. For example, your options have to be confined to the Category description field, which can be also found in the table named Retail_Category Dimension. Therefore, you can use the Category description field of that table for selection.

    QQ图片20230413141925.png

    Effect Display

    For details, see section "Preview".


    Attachment List


    Theme: 数据分析进阶
    前の記事
    次の記事
    • いいね
    • 良くない
    • 閲覧しただけ

    フィードバック

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    10s后关闭