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.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 member value

Author  Topic 

shanmugaraj
Posting Yak Master

219 Posts

Posted - 2013-10-10 : 05:18:39
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

52326 Posts

Posted - 2013-10-10 : 05:57:13
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 - 2013-10-10 : 06:49:02
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

52326 Posts

Posted - 2013-10-10 : 08:27:13
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 - 2013-10-10 : 10:45:43
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
   

- Advertisement -