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)
 member value
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

shanmugaraj
Posting Yak Master

219 Posts

Posted - 10/10/2013 :  05:18:39  Show Profile  Send shanmugaraj a Yahoo! Message  Reply with Quote
Senario :
If Selected dimension value is more than 2010, display an value else display other value.

CREATE MEMBER CURRENTCUBE.[MEASURES].[Total Use]
AS
IIf( [Period].[Calendar Hierarchy].CurrentMember.MemberValue > 2010,
100,200),
FORMAT_STRING = "#,0.00",
SOLVE_ORDER = 2130,
VISIBLE = 1;

Result is giving all records as 100.


Suggest me what is the error in my code


THANKS
SHANMUGARAJ
nshanmugaraj@gmail.com

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 10/10/2013 :  05:57:13  Show Profile  Reply with Quote
shouldnt it be this?

CREATE MEMBER CURRENTCUBE.[MEASURES].[Total Use]
AS 
IIf( [Period].[Calendar Hierarchy].CurrentMember.Value > 2010,
100,200), 
FORMAT_STRING = "#,0.00", 
SOLVE_ORDER = 2130,
VISIBLE = 1;


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

shanmugaraj
Posting Yak Master

219 Posts

Posted - 10/10/2013 :  06:49:02  Show Profile  Send shanmugaraj a Yahoo! Message  Reply with Quote
Not working .. same issue exists
If i use[Period].[Calendar Hierarchy].CurrentMember.MemberValue , i get 100
If i use [Period].[Calendar Hierarchy].CurrentMember.Value , i get 200

please help

THANKS
SHANMUGARAJ
nshanmugaraj@gmail.com
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 10/10/2013 :  08:27:13  Show Profile  Reply with Quote
so whats your expected value?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

shanmugaraj
Posting Yak Master

219 Posts

Posted - 10/10/2013 :  10:45:43  Show Profile  Send shanmugaraj a Yahoo! Message  Reply with Quote
If I give as below, i need to have data showing 100 and 200 with respect to rows.


CREATE MEMBER CURRENTCUBE.[MEASURES].[Total Use]
AS
IIf( [Period].[Calendar Hierarchy].CurrentMember.Value > [Period].[Calendar Hierarchy].[Calendar Hierarchy - Year].&[2010],
100,200),
FORMAT_STRING = "#,0.00",
VISIBLE = 1;



Senario :
I have [Period] Dimension , Fact_Usage Measure.
When i select Period for year greater than 2010, data has to show one value else other value
[based on my formula- here i have given as 100 , 200] .

THANKS
SHANMUGARAJ
nshanmugaraj@gmail.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.06 seconds. Powered By: Snitz Forums 2000