Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Mdx - Sum quantities over id - distinct sum

chevito (Programmer)
21 Feb 12 0:58
Hi all,

I have the next scenario:

I have a factories table, with factoryId, NumEmployees, NumFemaleEmployees, NumMaleEmployees and countryId (among others). Then I have this other table called province workers with ProvinceWorkerId, FactoryId, WorkerCount, Province (text). I am working on a OLAP cube, and I have created a fact table with this info:

FactoryId, NumEmployees, NumMaleEmployees, NumFemaleEmployees, CountryId, WorkerCount, Province.

My issue, is when I try to make sums. I end up with registries like:
FctyId #Employees #Female #Male Cty WorkerCount Province
1        100        70      30   2     12       Arizona
1        100        70      30   2     30       Nebraska
1        100        70      30   2     20       Texas
2        200        60      140  2     30       Arizona

When I get the sum of WorkerCount, everything is ok, but getting the NumEmployees sums, does not work, because it is retrieving the repeated data. I don't know how to do in MDX to sum up by FactoryId, I mean adding that measure.

I have two limitations right now, I can only use one fact table, and the measures must be in that fact table (because of the control that I am using). Maybe I have a design error (this is my very first cube), so any suggestions would be welcome, and if this has been answered before, the link could help me a lot.

Thanks, and have a good day.
PWise (Programmer)
21 Feb 12 15:40
is this an access forms question?
chevito (Programmer)
21 Feb 12 15:44
Well, I am using the 3rd party Radar Soft component (Asp.Net MVC), and I just created an sql view as my fact table.  In the Radar Soft documentation, it is stated that I can use MDX queries, so that is kinda of what I am searching for. Create a calculated measure, and put the MDX expression to calculate it.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close