Solved

calculated member on a dimension

Posted on 2010-09-08
7
728 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
  • 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
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now