[{"id":"bcb0874d-299b-448e-9552-9e9b25ef80dd","tags":[{"product":null,"links":null,"id":"ba7e818e-4f6b-4211-b1ac-58e3bafcf439","name":"\u66F4\u65B0","color":"orange","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"8ce3627e-9e58-471b-9133-4f135d191e7b","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"ae60ae59-34f5-4f32-a8eb-243ed1457543","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"3d4848c3-910f-4ffa-9153-60bb507334a9","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"133f4ca6-d951-4d65-a618-3dc6301266f7","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"de62ec1c-813e-40b1-8160-a4cd109afe64","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2426c71d-8332-4cbd-a436-1ec4f8666464","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2ce7b6b0-78aa-4e4b-bf8a-e4ba2f988298","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"4706db46-0811-4652-8f59-1e0a1da84758","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"8f1271bb-2cd9-4f39-9897-c15b239ee7ab","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"677e13a7-6f3e-449f-986c-2c3a26f8d54f","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"5e40f6dc-caec-49d7-a1d0-be65f06815ba","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2457f0e0-9e71-4860-a87d-065e0fb84f84","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"d5c67fd0-1145-482c-9113-97b492c44c18","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"a609a8fa-ab91-4c1d-a1c3-d209d0463303","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"b4a9eb15-94e5-48df-b218-a24138f0cf9c","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]}]
        
(Showing Draft Content)

同比环比分析

实现效果

在仪表板中,根据转化分析步骤可实现如下效果:

image

基于透视表,通过同比环比来快速分析数据的长期趋势和短期趋势。

模型定义

同比:与历史同时期比较,例如2022年3月份与2021年3月份相比,叫同比。

环比:与上一个统计周期比较,例如2022年4月份与2022年3月份相比较,称为环比。

同比:通常是指今年第n月与去年第n月比。同比发展速度主要是为了消除季节变动的影响,用以说明本期发展水平与去年同期发展水平对比而达到的相对发展速度。常用于分析数据的长期趋势。

环比:通常是指表示连续2个单位周期(比如连续两月)内的量的变化比。环比包括两种:环比增长速度和环比发展速度。常用于分析数据的短期趋势。

实现分析

分析步骤:

  1. 收集数据。

  2. 同环比实现思路。

  3. 处理数据,添加所需要的计算列和度量值。

  4. 季度同比环比、年度同比环比。

  5. 绘制同比环比分析图。

计算公式:

  1. 同比增长率=(本期某指标数值-同期某指标数值)÷同期某指标数值×100%

  2. 环比增长率=(本期某指标数值-上期该指标数值)÷上期该指标数值×100%

数据处理

梳理原始数据 :

订购日期

订单金额

订单数量

2019-10-05

18

20

2019-10-06

30

10

添加计算列 :

  • 添加 年度、季度、下年度、下季度、 环比年度、环比季度 计算列

年度

Year('同比测试'[订购日期])

季度

Quarter('同比测试'[订购日期])

下年度

Year('同比测试'[订购日期]) + 1

下季度

Quarter('同比测试'[订购日期])

环比年度

if( Quarter('同比测试'[订购日期])>=4,'同比测试'[年度]+1,'同比测试'[年度])

环比季度

if((Quarter('同比测试'[订购日期])+1)>4,1,(Quarter('同比测试'[订购日期])+1))

添加度量值 :

上一年合计

var basetable = SelectColumns(
    '同比测试',
    "年度", '同比测试'[下年度],
    "订单金额",'同比测试'[订单金额])

 return Calculate(
    SumX(basetable,[订单金额]), Values([年度]))

同比季度合计

var basetable = SelectColumns(
    '同比测试',
    "年度", '同比测试'[下年度],
    "订单金额",'同比测试'[订单金额])

 return Calculate(
    SumX(basetable,[订单金额]), Values([年度]))

环比季度合计

var basetable = SelectColumns(
    '同比测试',
    "年度", '同比测试'[环比年度],
    "季度", '同比测试'[环比季度],
    "订单金额",'同比测试'[订单金额])

 return Calculate(
    SumX(basetable,[订单金额]), Values([年度]))
  • 季度同比率 :

Divide('同比测试'[当前年合计] - '同比测试'[同比季度合计], '同比测试'[同比季度合计])
  • 季度环比率 :

Divide('同比测试'[当前年合计] - '同比测试'[环比季度合计], '同比测试'[环比季度合计])

可视化

在仪表板中,基于时间,构建可视化页面。

通过透视表来进行年度同比环比分析的分析:

07-10-01

通过透视图来进行年度同比环比年分析:

07-10-02

通过透视表来进行季度环比分析:

07-10-03