Forum Discussion
Calculate Sales Growth
Hi,
I want to calcualte sales growth (TY-LY)/LY for each outlet.
for Eg: sales growth=(rolling week 1-rolling week 11)/rolling week 11 for each outlet. I want the Sales growth result mentioned in the table
Below is the sample data.
| rolling week | week | Outlet | Sales | Year | Sales Growth |
| 1 | 3/3/2023 | KG | 1000 | TY | -9.1% |
| 1 | 3/3/2023 | CH | 500 | TY | -9.1% |
| 1 | 3/3/2023 | MS | 700 | TY | 40.0% |
| 1 | 3/3/2023 | MKT | 2000 | TY | -7.0% |
| 2 | 2/24/2023 | KG | 1500 | TY | 25.0% |
| 2 | 2/24/2023 | CH | 100 | TY | -60.0% |
| 2 | 2/24/2023 | MS | 1000 | TY | 81.8% |
| 2 | 2/24/2023 | MKT | 2600 | TY | 30.0% |
| 3 | 2/17/2023 | KG | 500 | TY | -28.6% |
| 3 | 2/17/2023 | CH | 200 | TY | -33.3% |
| 3 | 2/17/2023 | MS | 300 | TY | 50.0% |
| 3 | 2/17/2023 | MKT | 1000 | TY | -16.7% |
| 11 | 3/4/2022 | KG | 1100 | LY | |
| 11 | 3/4/2022 | CH | 550 | LY | |
| 11 | 3/4/2022 | MS | 500 | LY | |
| 11 | 3/4/2022 | MKT | 2150 | LY | |
| 12 | 2/25/2022 | KG | 1200 | LY | |
| 12 | 2/25/2022 | CH | 250 | LY | |
| 12 | 2/25/2022 | MS | 550 | LY | |
| 12 | 2/25/2022 | MKT | 2000 | LY | |
| 13 | 2/18/2022 | KG | 700 | LY | |
| 13 | 2/18/2022 | CH | 300 | LY | |
| 13 | 2/18/2022 | MS | 200 | LY | |
| 13 | 2/18/2022 | MKT | 1200 | LY |
pavanpal1605 , With help from Date table you can have measure like this for last year
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))then you can have diff
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145sWhy Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
1 Reply
- amitchandak
Super User
pavanpal1605 , With help from Date table you can have measure like this for last year
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))then you can have diff
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145sWhy Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.