473,433 Members | 1,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,433 software developers and data experts.

Calculated member depended on dimension value

I have a dimension called MyDimension with attributes
- Model
- ModelValue

One of my measures called MyMeasure.

I need a calculated measure to calculate the value based on existing measure and dimension Model/ModelValue pair above.

In particularly,
Expand|Select|Wrap|Line Numbers
  1. case 
  2.    when MyDimension.Model.MemberValue = "A" then [Measures].[MyMeasure] * [MyDimension].[ModelValue].MemberValue
  3.    when MyDimension.Model.MemberValue = "B" then [Measures].[MyMeasure] * [MyDimension].[ModelValue].MemberValue / 100
  4.    else Null
  5. end
I could have this calculated, however, the totals aren't aggregated. Can someone help me?

Thanks
Sep 20 '10 #1
5 2755
ck9663
2,878 Expert 2GB
If you need to aggregate all of it, you're going to need to use aggregate function, like COUNT(*) or SUM()

Happy Coding!!!

~~ CK
Sep 20 '10 #2
Hi ck9663, I'm a newbe to ssas, could you be a bit more specific? i.e where should I make that sums? in Scope or another calculated member? The expectation is to drag any attributes of MyDimension and should be able to aggregate by all, thanks in advance
Sep 20 '10 #3
ck9663
2,878 Expert 2GB
I'm not familar with SSAS. Is this sql based? Post te entire T-SQL that you're having a problem with. We'll go from there.

Happy Coding!!!

~~ CK
Sep 20 '10 #4
No, it's not T-SQL based it's mdx query
Sep 20 '10 #5
ck9663
2,878 Expert 2GB
Are you reading SQL Server table?

~~ CK
Sep 21 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Anote Sangkunakupt | last post by:
I have created a virtual cube in SQL2000. Then, I have generated a Calculated Member. When I did rollup into a higher level, SQL2000 did re-calculate the member. However, I want to summerize the...
1
by: Sara | last post by:
I am trying to use MDX to dynamically determine which hierarchy of the time dimension is selected. I have a calculated member which is using the last non-empty descendant of the . dimension, but...
0
by: Pradeep | last post by:
I wanted to create a calculated member for a cube using member propery os dimension .My MDX syntax is as follows Sum({.})/(Val(..Members.CurrentMember.DataMember.Properties("Int Total Emp"))) ...
0
by: Pradeep | last post by:
I have defined a member property called "int Total Emp" under the dimension team and defined calculated member under measures using this property called "total # emp" as .properties("int Total...
2
by: Jason Heyes | last post by:
Do you only add derived member variables to a class to improve performance? Here is an example: int square(int integer) { return integer * integer; } vector<int> compute_squares(vector<int>...
24
by: ALI-R | last post by:
Hi All, First of all I think this is gonna be one of those threads :-) since I have bunch of questions which make this very controversial:-0) Ok,Let's see: I was reading an article that When...
3
by: kelley.l.turner | last post by:
Hi all, I am very new to MS Access so please bear with me! I have created a simple calculated field in my data entry form, yet when I view my data table or try to generate a report based on...
12
by: Sam Kong | last post by:
Hi, JavaScript hides its memory structure. I know that numbers, booleans, null and undefined are value types (value is directed saved in a variable). I want to know: - How JavaScript...
6
by: dtschoepe | last post by:
Hi all, Working on homework again... I've got a weird problem, I've been banging my head against the wall on what is causing it. I have a pointer to a typdef named Person. At one point in the...
6
by: MLM450 | last post by:
Is it possible to retrieve an item's "sizeconst" value dynamically? I have the following member defined in a class: private char units; I want the code that values the units member to know...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.