Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
vijays3
Constraint Violating Yak Guru
354 Posts |
Posted - 2012-08-01 : 13:08:07
|
[code]Hi ,I am creating cube and I want to calculate the %diffence in current quarter to previous quarter for saleAmt in particular year.I have Calender tabel on which I have created CalenderHirarachy and it's memebers are Year,QuarterName,monthName.I have created following calculated fields.1) Current SalesAmt : ([Measures].[SalesAmt],[Calender][CalenderHirarachy].CurrentMember) 2) Previous SalesAmt: ([Measures].[SalesAmt],[Calender][CalenderHirarachy].prevmember)%Avg SaleAmt ((Current SalesAmt-Previous SalesAmt)/Previous SalesAmt)*100%Avg SaleAmt should be clculated..By doing above I am not getting right result.. Quarter SalesAmt %Avg SaleAmt Q1 4500.00 Q2 3000.00 Q3 2500.00 Q4 1000.00[/code]Vijay is here to learn something from you guys. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-01 : 14:38:06
|
what are the values you're expecting? and what are values you're getting?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|