[仅限PaaS]{class="badge informative" title="仅适用于云项目(Adobe管理的PaaS基础架构)和内部部署项目上的Adobe Commerce 。"}

在零售业日历中报告

本主题演示如何设置结构以在您的帐户中使用4-5-4零售日历Adobe Commerce Intelligence。 可视化Report Builder提供了极其灵活的时间范围、间隔和独立的设置。 但是,所有这些设置都可以与传统每月日历配合使用。

由于许多客户会更改其日历以使用零售日期或会计日期,因此以下步骤说明了如何使用您的数据并使用零售日期创建报表。 尽管下面的说明引用了4-5-4零售日历,但您可以为您的团队使用的任何特定日历更改它们,无论是财务日历还是自定义时间范围。

在开始之前,您应该查看文件上载程序,并确保已拉长.csv文件。 这可确保日期涵盖所有历史数据并将日期推送到未来。

此分析包含高级计算列

快速入门

您可以下载 2014至2017年零售业4-5-4零售日历的.csv版本。 您可能需要根据内部零售日历调整此文件,并扩展日期范围以支持您的历史和当前时间范围。 下载文件后,使用文件上传程序在Commerce Intelligence Data Warehouse中创建零售业日历表。 如果您使用的是4-5-4零售日历的未更改版本,请确保此表中的字段的结构和数据类型与以下内容匹配:

列名称
列数据类型
主键
Date Retail
Date & Time
Yes
Year Retail
Whole Number
No
Quarter Retail
Whole Number
No
Month Number Retail
Whole Number
No
Week Retail
Whole Number
No
Month Name Retail
Text (最多255个字符)
No
Week Number of Month Retail
Whole Number
No

要创建的列

  • sales_order ​表

    • INPUT created\_at (yyyy-mm-dd 00:00:00)

      • Column type: - Same table > Calculation
      • Inputs: - created\_at
      • Datatype: - Datetime
      • Calculation: - case when A is null then null else to\_char(A, 'YYYY-MM-DD 00:00:00') end
  • 零售日历 ​文件上传表

    • 当前日期

      • Column type: Same table > Calculation

      • Inputs: Date Retail


      • 数据类型: Datetime

      • Calculation: case when A is null then null else to\_char(now(), 'YYYY-MM-DD 00:00:00') end

        note note
        NOTE
        上述now()函数特定于PostgreSQL。 尽管大多数Commerce Intelligence数据仓库都托管在PostgreSQL上,但某些数据仓库可能托管在Redshift上。 如果以上计算返回错误,您可能需要使用Redshift函数getdate()而不是now()
    • 当前零售年度(必须由支持分析人员创建)

      • Column type: Event Counter
      • Local Key: Current date
      • Remote Key: Retail calendar.Date Retail

      • Operation: Max
      • Operation value: Year Retail
    • 包含在当前零售年度中? (是/否)

      • Column type: Same table > Calculation

      • Inputs:

        • A - Year Retail
        • B - Current retail year

      • 数据类型: String

      • Calculation: case when A is null or B is null then null when A = B then 'Yes' else 'No' end

    • 包括在上一零售年度中? (是/否)

      • Column type: Same table > Calculation

      • Inputs:

        • A - Year Retail
        • B - Current retail year

      • 数据类型: String

      • Calculation: case when A is null or B is null then null when (A = (B-1)) then 'Yes' else 'No' end

  • sales_order ​表

    • 创建_at (零售年)

      • Column type: One to Many > JOINED\_COLUMN

      • 路径 —

        • Many: sales\_order.\[INPUT\] created\_at (yyyy-mm-dd 00:00:00)
        • One: Retail Calendar.Date Retail
      • 选择table: Retail Calendar

      • 选择column: Year Retail

    • 创建_at(零售周)

      • Column type: One to Many > JOINED\_COLUMN

      • 路径 —

        • Many: sales_order。[INPUT]已创建_at (yyyy-mm-dd 00:00:00
        • One: Retail Calendar.Date Retail
      • 选择table: Retail Calendar

      • 选择column: Week Retail

    • 创建_at (零售月份)

      • Column type: One to Many > JOINED\_COLUMN

      • 路径

        • Many: sales\_order.\[INPUT\] created\_at (yyyy-mm-dd 00:00:00)
        • One: Retail Calendar.Date Retail
      • 选择table: Retail Calendar

      • 选择column: Month Number Retail

    • 是否包含在上一个零售年度? (是/否)

      • Column type: One to Many > JOINED\_COLUMN

      • 路径 —

        • Many: sales\_order.\[INPUT\] created\_at (yyyy-mm-dd 00:00:00)
        • One:零售业Calendar.Date Retail
      • 选择table: Retail Calendar

      • 选择column: Include in previous retail year? (Yes/No)

    • 是否包含在当前零售年度中? (是/否)

      • Column type: One to Many > JOINED\_COLUMN

      • 路径 —

        • Many: sales\_order.\[INPUT\] created\_at (yyyy-mm-dd 00:00:00)
        • One:零售业Calendar.Date Retail
      • 选择table: Retail Calendar

      • 选择column: Include in current retail year? (Yes/No)

量度

注意:此分析不需要任何新指标。 但是,在继续这些报告之前,请确保将sales_order表中构建的新列添加为sales_order表上所有量度的维度

报告

  • 每周订单 — 零售日历(按年)

    • 量度A2017

      • Metric:订单数
      • Filter:
        • 创建时间_at(零售业年份)= 2017
    • 量度B2016

      • Metric:订单数
      • Filter:
        • 创建时间_at(零售业年份)= 2016
    • 量度C2015

      • Metric: Number of orders
      • Filter:
        • Created\_at (retail Year) = 2015
    • Time period: All time


    • Interval: None


    • Group by: Created\_at (retail week)


    • Chart type: Line

      • 关闭multiple Y-axes
  • 零售业日历概述(当前零售业年份,按月)

    • 量度ARevenue


      • 量度: Revenue
      • Filter:

        • Include current retail year?: Yes
    • 量度BOrders

      • Metric: Number of orders
      • Filter:

        • Include current retail year?: Yes
    • 量度CAvg order value

      • Metric: Avg order value
      • Filter:

        • Include current retail year?: Yes
    • Time period: All time


    • Interval: None


    • Group by: Created\_at (retail month)


    • Chart type: Line

  • 零售日历概述(上一零售年按月)

    • 量度ARevenue


      • 量度: Revenue
      • Filter:

        • Include current retail year?: Yes
    • 量度BOrders

      • Metric:订单数
      • Filter:

        • Include current retail year?: Yes
    • 量度CAvg order value

      • Metric: Avg order value
      • Filter:

        • Include current retail year?: Yes
    • Time period: All time


    • Interval: None


    • Group by: Created\_at (retail month)


    • Chart type: Line

后续步骤

以上描述了如何配置零售日历,使其与在sales\_order表上构建的任何量度(如RevenueOrders)兼容。 您还可以对其进行扩展,以支持基于任何表构建的量度的零售日历。 唯一要求是此表必须有一个有效的日期时间字段,可用于联接Retail Calendar表。

例如,要在4-5-4零售日历上查看客户级别量度,请在Same Table表中创建一个customer\_entity计算,类似于上面描述的\[INPUT\] created\_at (yyyy-mm-dd 00:00:00)。 然后,您可以使用此列通过将One to Many表连接到Created_at (retail year)表来重现Include in previous retail year? (Yes/No) JOINED_COLUMN计算(如customer\_entity)和Retail Calendar

在生成新报告之前,不要忘记将所有新列作为维度添加到量度

recommendation-more-help
e1f8a7e8-8cc7-4c99-9697-b1daa1d66dbc