Can anyone suggest me how to achieve below calculation?
I want to create 2 measure:
Measure1. total revenue per quarter/revenue in 1st month of that quarter
Measure2. total revenue per quarter/revenue in 1st month + 2nd month of that quarter
Well asuming you have a way to identify the quarter or even better a quarter dimension object then what you need something like;
=If [Month] InList (1;4;7;10) Then [Sales revenue]
this will get you your sale rev for 1st month of each quarter & then you need something like blocks sectioned by Quarter, take the sum of the block & divide by the previous variable and you got your first measure. Then use the same approach for the second measure.
if you are going to present your data in a single table (i.e. with columns: Quarter, Month, Revenue, Rolling%) then you could define the Rolling% variable as
=If ([Month]=Max([Month]) In ([Quarter]);1;If([Month]=Min([Month]) In([Quarter]);[revenue];[revenue]+Previous([revenue])) /(Sum([revenue]) In ([Quarter])) )