This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
We have suppliers who's seasons over lap years. For instance they start supplying us in Week 42 and end supply in week 7.
I need to write something in Power Query that will get me the year for these weeks.
In this example week 42 is in 2022. So the start year is 2022. How can I write it so that it gives me 2022 as the year for Weeks 42-52 and 2023 for weeks 1-7.
I did write:
if [Week]<42 then 2023 else 2022
but it could be different weeks for different suppliers.
Can anyone help at all?
Hi,
Any chances you can provide how the table where you want to add that formula looks like?
Like this?
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |