In TSQL I can do this to get the amount of days in some month:
declare @date as datetime
set @date = '2015-02-06'
select datediff(day, dateadd(day, 1-day(@date), @date),
dateadd(month, 1, dateadd(day, 1-day(@date), @date)))
How can I get the same functionality in MDX? P.S. I need the result to be an int.
If you have a year-month-date hierarchy in place, it could be done in the below fashion:
You just need to to pass the month's value in the slicer. The calculated member will do the rest.