SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 SaleAmt of current and previous Quarter
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vijays3
Constraint Violating Yak Guru

India
311 Posts

Posted - 08/01/2012 :  13:08:07  Show Profile  Reply with Quote

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


Vijay is here to learn something from you guys.

visakh16
Very Important crosS Applying yaK Herder

India
47023 Posts

Posted - 08/01/2012 :  14:38:06  Show Profile  Reply with Quote
what are the values you're expecting? and what are values you're getting?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000