Solved

calculated member on a dimension

Posted on 2010-09-08
7
730 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

786 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