[僅限PaaS]{class="badge informative" title="僅適用於雲端專案(Adobe管理的PaaS基礎結構)和內部部署專案的Adobe Commerce 。"}
在零售行事曆上建立報表
此主題示範如何設定結構以在您的帳戶中使用4-5-4零售行事曆Adobe Commerce Intelligence。 視覺化Report Builder提供極為靈活的時間範圍、間隔和獨立設定。 不過,所有這些設定都可以搭配現有的傳統每月行事曆運作。
由於許多客戶會變更其行事曆以使用零售或會計日期,以下步驟說明如何使用零售日期來使用您的資料並建立報表。 雖然以下指示參考4-5-4零售日曆,但您可以為團隊使用的任何特定日曆更改它們,無論是財務日曆還是自訂時間範圍。
開始之前,您應該檢閱檔案上傳程式,並確定您已拉長.csv檔案。 這可確保日期涵蓋所有歷史資料,並將日期推送至未來。
此分析包含進階計算資料行。
快速入門
您可以下載2}版本的4-5-4零售日曆,適用於2014至2017年的零售業。 .csv您可能需要根據內部零售日曆調整此檔案,並擴大日期範圍以支援您的歷史和目前時間範圍。 下載檔案後,使用檔案上傳程式在Commerce Intelligence Data Warehouse中建立零售業行事曆表格。 如果您使用4-5-4零售行事曆的未變更版本,請確保此表格中欄位的結構和資料型別符合以下內容:
Date RetailDate & TimeYesYear RetailWhole NumberNoQuarter RetailWhole NumberNoMonth Number RetailWhole NumberNoWeek RetailWhole NumberNoMonth Name RetailText (最多255個字元)NoWeek Number of Month RetailWhole NumberNo要建立的欄
-
sales_order 資料表
-
INPUTcreated\_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: -
-
-
零售行事曆 檔案上傳表格
-
目前日期
-
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') endnote note NOTE 上述 now()函式是PostgreSQL專屬的函式。 雖然大部分Commerce Intelligence資料倉儲都在PostgreSQL上代管,但有些可能會在Redshift上代管。 如果上述計算傳回錯誤,您可能需要使用Redshift函式getdate(),而非now()。
-
-
目前的零售年度 (必須由支援分析人員建立)
- Column type: E
vent Counter - Local Key:
Current date - Remote Key:
Retail calendar.Date Retail -
Operation:Max - Operation value:
Year Retail
- Column type: E
-
包含在目前的零售年度中? (是/否)
-
Column type:
Same table > Calculation -
Inputs:
A-Year RetailB-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 RetailB-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
- Many:
-
選取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零售業
-
選取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
- Many:
-
選取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
- Many:
-
選取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
- Many:
-
選取table:
Retail Calendar -
選取column:
Include in current retail year? (Yes/No)
-
-
量度
注意:此分析不需要新量度。 不過,在繼續處理報表之前,請務必將您在sales_order表格中建立的新欄新增為sales_order表格上所有量度的維度。
報表
-
每週訂單 — 零售行事曆(YoY)
-
量度
A:2017- Metric:訂單數
- Filter:
- 建立時間_at (零售業年份) = 2017
-
量度
B:2016- Metric:訂單數
- Filter:
- 建立時間_at (零售業年份) = 2016
-
量度
C:2015- Metric:
Number of orders - Filter:
Created\_at (retail Year) = 2015
- Metric:
-
Time period:
All time -
Interval:None -
Group by:Created\_at(retail week) -
Chart type:Line- 關閉
multiple Y-axes
- 關閉
-
-
零售行事曆總覽(目前零售年份,依月份)
-
量度
A:Revenue-
公制:Revenue - Filter:
-
Include current retail year?:Yes
-
-
-
量度
B:Orders- Metric:
Number of orders - Filter:
-
Include current retail year?:Yes
-
- Metric:
-
量度
C:Avg order value- Metric:
Avg order value - Filter:
-
Include current retail year?:Yes
-
- Metric:
-
Time period:
All time -
Interval:None -
Group by:Created\_at(retail month) -
Chart type:Line
-
-
零售行事曆總覽(前一個零售年度,依月份)
-
量度
A:Revenue-
公制:Revenue - Filter:
-
Include current retail year?:Yes
-
-
-
量度
B:Orders- Metric:訂單數
- Filter:
-
Include current retail year?:Yes
-
-
量度
C:Avg order value- Metric:
Avg order value - Filter:
-
Include current retail year?:Yes
-
- Metric:
-
Time period:
All time -
Interval:None -
Group by:Created\_at(retail month) -
Chart type:Line
-
後續步驟
上述說明如何設定零售行事曆以與您sales\_order資料表上建置的任何量度相容(例如Revenue或Orders)。 您也可以擴充此功能,以支援任何表格上建立之量度的零售業行事曆。 此表格唯一需要的是一個有效的日期時間欄位,可用來聯結至「零售業行事曆」表格。
例如,若要在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。
在建立新報表之前,別忘了將所有新欄新增為量度的維度。