March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a set of data with a Year-Week column.
I want to create a couple of measures for This Year QUS and Last Year QUS so I can see the year on year variance.
So effectively it will show Year-Week 2018-50 as one measure and 2017-50 as another.
Also, when I have a slicer with the Year-Weeks in if I selected 2018-49 it would then show 2017-49.
If I had a date column I could use SAMEPERIODLASTYEAR but unfortunately I don't
Solved! Go to Solution.
Hi @Anonymous
You may create the Year column and Week column. Then you may get the last year QUS as below.
LastYearQUS = CALCULATE ( [QUS], FILTER ( ALL ( Table ), Table[Year] = SELECTEDVALUE ( Table[Year] ) - 1 && Table[Week] = SELECTEDVALUE ( Table[Week] ) ) )
Regards,
Cherie
Hi @Anonymous
You may create the Year column and Week column. Then you may get the last year QUS as below.
LastYearQUS = CALCULATE ( [QUS], FILTER ( ALL ( Table ), Table[Year] = SELECTEDVALUE ( Table[Year] ) - 1 && Table[Week] = SELECTEDVALUE ( Table[Week] ) ) )
Regards,
Cherie
Hi @Anonymous
I would suggest you create a new thread on forum so that more community members can see it and provide advice. Please remember to post dummy data and desired result.
Regards,
Cherie
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
128 | |
90 | |
75 | |
56 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |