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.
When i use this
Fees % of Budget to last month 2 =
Solved! Go to Solution.
Hi @Aden
In order to filter on months before the current month, I would suggest using EOMONTH to get the last date of the previous month, then filter on dates <= that date. This can be wrapped in KEEPFILTERS to intersect with the current filter context.
Here is how you could write the measure:
(Note: I'm assuming your 'Calendar' table is marked as a date table, and 'Calendar'[trandate] is the date column.)
Fees % of Budget to last month 2 =
CALCULATE (
DIVIDE ( [Net Fees], SUM ( 'Budgets'[billamt_perday] ) ) * 100,
KEEPFILTERS ( 'Calendar'[trandate] <= EOMONTH ( TODAY (), -1 ) )
)
Does this give the expected result?
Regards,
Owen
Great thanks Owen. That done the trick!
Cheers
Hi @Aden
In order to filter on months before the current month, I would suggest using EOMONTH to get the last date of the previous month, then filter on dates <= that date. This can be wrapped in KEEPFILTERS to intersect with the current filter context.
Here is how you could write the measure:
(Note: I'm assuming your 'Calendar' table is marked as a date table, and 'Calendar'[trandate] is the date column.)
Fees % of Budget to last month 2 =
CALCULATE (
DIVIDE ( [Net Fees], SUM ( 'Budgets'[billamt_perday] ) ) * 100,
KEEPFILTERS ( 'Calendar'[trandate] <= EOMONTH ( TODAY (), -1 ) )
)
Does this give the expected result?
Regards,
Owen
User | Count |
---|---|
17 | |
17 | |
14 | |
13 | |
13 |
User | Count |
---|---|
17 | |
14 | |
13 | |
10 | |
8 |