Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I am trying to have a line graph that displays last week's revenue and this week's revenue period to date.
I have figured out this week with this:
VAR _PeriodToDate =
CALCULATE(
SUM(RevenueChannel[BookedRevenue]),
'Date'[Date] <= _MaxDate,
FILTER(ALL('Date'),
'Date'[Date] < TODAY() &&
'Date'[Date] >= TODAY() - 7
)
)
But cannot seem to figure out how to do the last week. I know I can easily just do this:
VAR _PeriodToDateTest =
CALCULATE(
SUM(RevenueChannel[BookedRevenue]),
'Date'[Date] <= _MaxDate,
FILTER(ALL('Date'),
'Date'[Date] < TODAY() - 7 &&
'Date'[Date] >= TODAY() - 14
)
)
But then they do not line up on the line graph:
Does anyone know how I would accomplish this?
Solved! Go to Solution.
I was way overthinking it...
CALCULATE(
SUM(RevenueChannel[BookedRevenue]),
'Date'[Date] <= _MaxDate - 7,
FILTER(ALL('Date'),
'Date'[Date] < TODAY() - 7 &&
'Date'[Date] >= TODAY() - 14
)
)
I was way overthinking it...
CALCULATE(
SUM(RevenueChannel[BookedRevenue]),
'Date'[Date] <= _MaxDate - 7,
FILTER(ALL('Date'),
'Date'[Date] < TODAY() - 7 &&
'Date'[Date] >= TODAY() - 14
)
)