Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |