cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Raks
Helper III
Helper III

Total sales of Last Year same week with Year Month and WeekNumber columns

Hi Team,

I have Year, Month and Week Number and Sales , I have to calculate last year sales of the same week.

YearMonthWeekSales
20221110
20221220
20221330
20221440
20221550
20231160
20231270
20231380
20231490
202325100

Result 

YearMonthWeekSalesResult 
20221110 
20221220 
20221330 
20221440 
20221550 
2023116010
2023127020
2023138030
2023149040
20232510050

 

Thanks in Advance !

 

1 ACCEPTED SOLUTION
Ahmedx
Solution Sage
Solution Sage
3 REPLIES 3
Ahmedx
Solution Sage
Solution Sage

Raks
Helper III
Helper III

@Ahmedx ,

I dont have any other table its just single table and no date column too, It has only Year,MonthNumber & WeekNumber.


Thanks!

Ahmedx
Solution Sage
Solution Sage

you must have a calendar table
if there is a calendar, then you can use

Measure = CALCULATE(SUM('Table'[Sales]) ,DATEADD(Calendar[Date],-1,YEAR))

to get the desired result

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors