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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
)
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 13 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 25 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |