Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

运算函数表达式描述
计算占比{度量A}/total({度量A})对应数据行度量A占合计的百分比
计算完成率{度量A}/{度量B}对应数据行度量A占度量B的比例
计算同比或环比({度量A}-{去年度量A})/{去年度量A}对应数据行度量A较上期值的增长比率

...

Tip

 

计算上月汇总的数量的SQL:

select 月份,sum(数量) as 数量 ,
( select sum(数量) from workbook1 t2 where
t2.月份||'-01'=date(t1.月份||'-01','-1 month')
) as 上月数量
from workbook1 t1 group by 月份