Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
pavanpal1605
Frequent Visitor

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 weekweekOutletSalesYearSales Growth
13/3/2023KG1000TY-9.1%
13/3/2023CH500TY-9.1%
13/3/2023MS700TY40.0%
13/3/2023MKT2000TY-7.0%
22/24/2023KG1500TY25.0%
22/24/2023CH100TY-60.0%
22/24/2023MS1000TY81.8%
22/24/2023MKT2600TY30.0%
32/17/2023KG500TY-28.6%
32/17/2023CH200TY-33.3%
32/17/2023MS300TY50.0%
32/17/2023MKT1000TY-16.7%
113/4/2022KG1100LY 
113/4/2022CH550LY 
113/4/2022MS500LY 
113/4/2022MKT2150LY 
122/25/2022KG1200LY 
122/25/2022CH250LY 
122/25/2022MS550LY 
122/25/2022MKT2000LY 
132/18/2022KG700LY 
132/18/2022CH300LY 
132/18/2022MS200LY 
132/18/2022MKT1200LY 
1 ACCEPTED SOLUTION
amitchandak
Super User
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=145s

 

Why 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-bd52912a5b...
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.

View solution in original post

1 REPLY 1
amitchandak
Super User
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=145s

 

Why 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-bd52912a5b...
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.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.