Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
21 | |
14 | |
14 | |
13 | |
13 |