You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

月度销售同比对比表新增行计算并展示百分比变化需求

Year-over-Year Percentage Change Calculation for Sales Data

Alright, let's work through this step by step to get that percentage change row added to your sales table. First, let's lock in the data we're using (I'll go with the corrected Mar-18 values from your expected output):

Original Sales Data

Month_YearSale_Vol#SalesAverage_Price
Mar-1712502550
Mar-189001560

Calculating Each Metric's YoY Change

Using your specified formula ((Current Year Value / Previous Year Value) - 1) * 100, here's how we get each percentage:

  • Sale_Vol: ((900 / 1250) - 1) * 100 = -28% (a 28% drop in sales volume)
  • #Sales: ((15 / 25) - 1) * 100 = -40% (a 40% decrease in total sales transactions)
  • Average_Price: ((60 / 50) - 1) * 100 = +20% (a 20% increase in average price per sale)

Final Table with YoY Percentage Change

Month_YearSale_Vol#SalesAverage_Price
Mar-1712502550
Mar-189001560
YoY % Change (18 vs 17)-28%-40%+20%

If you need to automate this for monthly updates (since your table swaps in new period data regularly), you can set up dynamic formulas in your tool of choice. For example, in Excel/Google Sheets, you could use =(B3/B2-1)*100 for the Sale_Vol change and drag it across the row—just make sure the formula references the correct previous-year row each month.

内容的提问来源于stack exchange,提问作者ravsun

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 07:03:34