Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

calculated member on a dimension

Posted on 2010-09-08
7
Medium Priority
?
736 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
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
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 2000 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

704 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