I'm working in Power BI with data in the following format:
| Year Number | Week Number | Sales Value |
|---|---|---|
| 1 | 1 | 20 |
| 1 | 1 | 15 |
| 2 | 5 | 32 |
| ...ect | ...ect | ...ect |
I'm currently using the measure Total Sales = SUM(Table[Sales Value]) and slicers for Year Number and Week Number to allow the user to view total sales for a selected year and week number.
What is the best way to also return the total sales value for the same week number in the previous year (i.e. week number = same, year number = selected - 1)? In excel it would be almost trivial to do with a SUMIFS formula, but I'm seriously struggling to find anything on how I should do it with DAX.