Hi Krishna,
I had a look at these posts. Indeed they solved the problem. Before I could make use of an ATV on M_TIME_DIMENSION. I had to convert the inverted date to a normal date and get the CalenderMonth YYYYMM. I used the column CalenderMonth to get the lastDay of the Month.
To calculate CalenderMonth beforehand so the join can make use of it, I had to create a calculated column directly at the table.
Thanks!
Patrik