I'm relatively new to PBI & DAX, looking for some guidance with this expression.
Using a fiscal (master) calendar, I need to calculate sales for the previous week. I have two tables, Fact and Master Calendar. They're joined by calendar date (datekey field). The previous year week is loaded into pbix, into a field.
Using the PreviousYearWeek already loaded, I need an expression that filters the Master Calendar to just the dates in the last fiscal week. I.e., FiscalYearWeek = 201933. This equals 8/3 - 8/9 in the Master Calendar table, which is joined to the Fact table. I need those records filtered, too. Should I be using CALCULATETABLE?
In Qlikview, I would simply use a short Set Analysis statement. Again, pretty new to DAX.
Here's where I'm at:
SUM ( QMFact[BoundCount] ),
Master_Calendar[FiscalYearWeek] = MAX ( DateReference[PrevYearWeek] )