Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I've searched online but cannot find an answer.
We measure sales by week. In table 1 I simply have date, sales. In table 2 date and week number. I created a YoY calc by date with no issue using SAMEPERIODLASTYEAR, all worked fine. But of course I am now comparing a Monday with a Sunday or similar. When I remove the date from the visual I get an error as it expects a date and week number is not a date.
There does not seem to be a way to do a YoY for week number.
Thanks,
Matt
Hi @MattN4
Please check out the thread wherein I have posted an alternative.
http://community.powerbi.com/t5/Desktop/Last-Year-This-Same-Week/m-p/164718#M71882
You mat find an answer.
Cheers
CheenuSing
@MattN4,
Create the following columns in your table. Then create visual using YearWeek and your YOY measure.
Year = YEAR(Table[Date])
YearWeek = 'Table'[Year]&'Table'[WeekNumber]
There is also a blog about calculating YOY based on week number for your reference.
https://www.sqlbi.com/articles/week-based-time-intelligence-in-dax/
Regards,
Lydia
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
73 | |
62 | |
51 | |
47 |
User | Count |
---|---|
212 | |
82 | |
61 | |
60 | |
57 |