Solved

calculated member on a dimension

Posted on 2010-09-08
7
733 Views
Last Modified: 2016-02-14
In SSAS I have deployed a cube named HCSALES.This cube has 4 measures such as:
- UnitSold
- SalesValue
- UnitReturn
- ReturnValue

Now I want to add a calculated member bu using my DimProduct dimension. This dimension has an attribute named ITPP. And my desired calculated member formula is like this:

SalesValue - (ITPP x UnitSold)

How can do this? Any idea?

Please help

P.S
I have tried to do it several times. I have also attached a screenshot
screenshot.png
0
Comment
Question by:innocent1973
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 15

Expert Comment

by:Tim Humphries
ID: 33634850
Hi,

The value will only be calculable when there is a current value for the DimProductMAX dimension.

Try using [Measures].[SalesValue] - (DimProductMAX.ITPP.CurrentMember.MemberValue * [Measures].[UnitSold])

Tim
0
 
LVL 22

Expert Comment

by:PedroCGD
ID: 33635051
The suggest pratice from microsoft is to set the dimension also as Measure Group. Just click on the dimension table on cube design and set it as measre group. Then you can work with attribute ITPP as a measure!
 Try it!
Regards.
Pedro
CBIP, MVP
0
 

Author Comment

by:innocent1973
ID: 33642103
Hello Pedro,
I have tried to apply the dimension attribute as a measure by using "new measure group" function. But I get an error such as:
"Object variable not set to an instance of an object". I have attached this screenshot as a png file.

And TimHumphries,
Thank you very much also to you. I have tried to apply your code snippet. But after cube processing all the calculated measure values are like these:
#VALUE

Is there anything wrong?
screen2.png
screen3.png
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 15

Expert Comment

by:Tim Humphries
ID: 33642725
Hi,

As I stated, if you are using ITTP in the calculation, then it will only be valid of there is a currentmember value for the hierachy in the query. I can't see this dimension in your browser which is probably why the value is not being calculated.

Tim
0
 

Author Comment

by:innocent1973
ID: 33644624
Thank for your reply Tim,
The ITTP calculate member is always #VALUE. And tooltiptext is:

Parser: the syntax for "All" is incorrect
0
 
LVL 22

Accepted Solution

by:
PedroCGD earned 500 total points
ID: 33644646
Go back... you made it wrong...
Follow the attached image to set a dimension as a dimension but also as a measure group.
Try it!
SSAS-MeasureGroup.JPG
0
 

Author Closing Comment

by:innocent1973
ID: 33644853
Thank you very much for your patient.. It works like a charm. GREAT!!!

TimHumphries, Thank you too

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question