Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register 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
)
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |