I need to get issues after 1 March 2018 and before this current month so I made this formula but 1 May is showing also and I don’t need it to be shown
The period I need is from 01 March until 30 April 2018
Sum(
Filter(
Descendants([Issue].CurrentMember, [Issue].[Issue]),
(DateBetween([Issue].CurrentHierarchyMember.get(‘Closure Date’),
‘01 Mar 2018’, ‘first day of current month’))
and [Measures].[Issue status] = ‘Closed’
and [Measures].[Issue type] = ‘CR’))
Unfortunately ‘last month’ is interpreted as the first day of previous month, so this will not work. For now, there is no option for relative date description of how to get the ‘last day of the previous month’. A good alternative for a calculated member is
DateSerial(Year(Now()), Month(Now()), 0)
The 0 date in DateSerial(…) function returns previous day.
I would also suggest that you filter Time dimension members and sum the ‘Issues with closure date’ measure. Filtering Time dimension would be faster than going through all issues.
Sum(Filter(
[Time].[Day].Members,
DateBetween(
[Time].CurrentMember.StartDate,
'1 Mar 2018',
DateSerial(Year(Now()), Month(Now()), 0)
))
, ([Measures].[Issues with closure date], [Status].[Closed], [Issue Type].[CR])
)