Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
44 | |
32 | |
30 | |
18 | |
17 |