Forum Discussion
Need help adding a date range to a measure
- 1 year ago
Hello RichOB
Active_Clients :=
VAR CurrentMonthStart = MIN('Main_Calendar'[Date])
VAR CurrentMonthEnd = MAX('Main_Calendar'[Date])
RETURN
CALCULATE(
COUNTROWS('Table'),
'Table'[Start_Date] <= CurrentMonthEnd,
OR(
ISBLANK('Table'[End_Date]),
'Table'[End_Date] >= CurrentMonthStart
)
)
Active_Clients_FY_2024_25 :=
CALCULATE(
[Active_Clients],
'Main_Calendar'[Date] >= DATE(2024, 4, 1),
'Main_Calendar'[Date] <= DATE(2025, 3, 31)
)
Active_Clients_FY_2023_24 :=
CALCULATE(
[Active_Clients],
'Main_Calendar'[Date] >= DATE(2023, 4, 1),
'Main_Calendar'[Date] <= DATE(2024, 3, 31)
)
Place 'Main_Calendar'[Month] (or a similar month/year field) on the x-axis.
Add both Active_Clients_FY_2024_25 and Active_Clients_FY_2023_24 as values for comparison
Thanks,
Pankaj Namekar | LinkedInIf this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Hi,
Share some data to work with and show the expected result. Share data in a format that can be pasted in an MS Excel file.