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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.