Please find the dummy data as an attachment.
I have one dimension YearQuarter and two expression A1 and B1.
I want to calculate B1 expression in such a way that it should sum the data of A1 for 2016Q1, 2016Q2, 2016Q3, 2016Q4 and same for 2017 Quarter data. I want the B1 data as below:
Please find the dummy data as an attachment. Can anybody give me the solution?
Thanks for your help!!!!!!!!!
If(Right(YearQuarter,1)='4', RangeSum(Before(Sum(Data), 0,4)))
View solution in original post
Create a Year Field: Left(YearQuarter,4) as Year
Then in the expression use:
If(Right(YearQuarter,2)='Q4', Before(Sum(Aggr(Sum(Data), Year)), 3,1))
Thanks for your help..
It is working fine.