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've searched for this answer a few different ways and I cannot come up with a good solution.
I am doing YOY sales comparrisons and using the SAMEPERIODLASTYEAR function. I have a date table as well as an orders table with multiple years of sales data.
I need daily comparrisons to be accurate not for the calendar date, but for the week and day of that week that match. So this Monday's sales need to be compared against last years Monday sales for this week. Today is 4/15/2019 and the equivalent date for last year would be 4/16/2018.
This is my date table.
Solved! Go to Solution.
Hi @awitt
You may try below measure:
Measure = CALCULATE ( SUM ( Table1[Sales] ), FILTER ( ALL ( 'Date' ), 'Date'[Year] = MAX ( 'Date'[Year] ) - 1 && 'Date'[Weeknumber] = MAX ( 'Date'[Weeknumber] ) && 'Date'[DayOfWeekNumber] = MAX ( 'Date'[DayOfWeekNumber] ) ) )
Regards,
Hi @awitt
You may try below measure:
Measure = CALCULATE ( SUM ( Table1[Sales] ), FILTER ( ALL ( 'Date' ), 'Date'[Year] = MAX ( 'Date'[Year] ) - 1 && 'Date'[Weeknumber] = MAX ( 'Date'[Weeknumber] ) && 'Date'[DayOfWeekNumber] = MAX ( 'Date'[DayOfWeekNumber] ) ) )
Regards,
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 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |