SSAS : one dimension instead of 3 times the same

I want to make a cube that show, for each factory, how many units produced and how many units transfered between 2 factories by month.
I have a DimFactory dimension that represents factories.
My 1st fact table (FactProduction) is what have been produced in a factory. So I have a FactoryKey that links my FactProduction to DimFactory.
My 2nd fact table (FactTransfer) is what have been transfered (i.e. shipped) between 2 factories. I have 2 foreign keys: FromFactoryKey and ToFactoryKey.
Both are linking my FactTransfer to DimFactory (so for each record I have a FROM and a TO).
I created a cube that uses both fact tables but of course when I do so, I have to use 3 dimensions (each of them being DimFactory):
Location      (FactProduction.FactoryKey -> DimFactory.FactoryKey)
LocationFrom  (FactTransfer.FromFactoryKey -> DimFactory.FactoryKey)
LocationTo    (FactTransfer.ToFactoryKey -> DimFactory.FactoryKey)
I would like to use only one dimension (Location) and using Calculated Fields I would have 3 measures:
Quantity Produced
Quantity Transfered From
Quantity Transfered To
So for the currentmember in DimFactory I would have 3 columns.
MONTH    |    FACTORY        |    Produced    |    TRF FROM    |    TRF TO
===============================================================================================
JANUARY        NEW YORK        45,600            23,450            12,344
FEBRUARY    MIAMI            20,200            12,233            5,673
What kind of calculation I must do to get these measures (and be able to use one DimFactory instead of three)
Thank you for your help

I found a way to do what I was looking for, by splitting my records in half.
So my fact table now has 2 records for each transfer, with only one FactoryKey with a column telling what kind of record it is (TO or FROM).
That way I can have a calculated field saying "if it is a TO, then TRANSFER IN QTY is QTY else TRANSFER IN QTY is 0 and same logic for a FROM"
In my cube I have only one dimension (DimFactory) and for each factory I have 2 columns : TRANSFER IN, TRANSFER OUT.

Similar Messages

  • HT3209 every time i try to buy anything an error box pops up that says my apple ID has expired and i try making a new one but it keeps telling me the same thing. what do i do?

    every time i try to buy anything an error box pops up that says my apple ID has expired and i try making a new one but it keeps telling me the same thing. i cant find an answer to my problem no mater what i do.

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • HT204406 Hello,  I have songs that show they are "Waiting" for download from the cloud but they are greyed out.  Some songs in one album are done others in the same album will not download. It is not a time function because i have been working on this for

    Hello,  I have songs that show they are "Waiting" for download from the cloud but they are greyed out.  Some songs in one album are done others in the same album will not download. It is not a time function because i have been working on this for weeks. I have allowed my compter to run for days and the songs are still not accessible.  I have a Match subscription and Match is working.  If I click on the "Genre" link the greyed out songs show that they are ready for download from the cloud but I cannot download them.  I have downloaded over 1500 other songs, so I am trying to understand what is going on here. I would appreciate any help anyone can give me.
    Thanks

    I did think about that and if I have to I will do that, however there are about 50 songs. I have closed and reopened iTunes several times and I am sure that I have the latest version. It fails right away but I can click on the cloud download icon and download the song that it failed on ... therefore it is not that song "or any one song" causing the issue. Any ideas?

  • Can I have more than one version of adobe reader at the same time?

    can I have more than one version of adobe reader at the same time?

    If I may add a qualification: on a device running full Windows 8, you may have both Adobe Reader Touch and Adobe Reader (normal desktop edition). This does not apply to the primitive devices which cannot run desktop apps (running "Windows RT"), and while I may be wrong, I believe that the Surface 2 is such a device.

  • Can I pair and use more than one set of bluetooth speakers at the same time on my ipod touch 4.0

    can I pair and use more than one set of bluetooth speakers at the same time on my ipod touch 4.0 or Iphone 4s or Ipad 2?

    You can only connect to one device at a time using Bluetooth, See article below for more information.
    http://support.apple.com/kb/ht1664
    While your iOS device can maintain multiple pairing records, it can only connect to one headset or hands-free device at a time. This prevents your iOS device from sending your data to the wrong Bluetooth accessory.

  • How do I move Contacts & Calendar from one User to another User on the same Macbook Pro?

    How do I move Contacts & Calendar from one User to another User on the same Macbook Pro? OSX 10.9.5

    is this second library in a different account on the computer?
    Look at Home Sharing.
    iTunes: How to share music and video - http://support.apple.com/kb/HT2688 - about Music Sharing and Home Sharing
    Home Sharing Support page - http://www.apple.com/support/homesharing/
    iTunes: Setting up Home Sharing on your computer - http://support.apple.com/kb/HT4620
    iTunes Home Sharing now works between users on same computer - https://discussions.apple.com/thread/3865597

  • How do i backup my iphone 3 started on one itunes account and restore to the same phone with a different itunes account without losing all my information?

    how do i backup my iphone 3 started on one itunes account and restore to the same phone with a different itunes account without losing all my information?

    Please search the forums. This has been covered here extensively.

  • Is there a way I can move movies from one itunes library to another on the same computer?

    Is there a way I can move movies from one itunes library to another on the same computer?

    Locate them in the Windows Explorer, move or copy those files as you would any other, and drag them into the open iTunes window when the second library is loaded. If you're using two iTunes libraries on one user account, you only need to locate the files; otherwise, they need to be put in a shared area.
    (63747)

  • If I have more than one I phone can I use the same apple ID for all off them?

    If I have more than one I phone can I use the same apple ID for all off them?

    Yes. You can have multiple iPhones on the same ID, up to the maximum 5 total devices. FaceTime will use the sim number for calls and you can configure each phone separately, or configure one and then back it up to iTunes and them restore the image to the others.

  • Move DC from one SC to another SC in the same track

    Hi colleagues,
    I am facing a problem when I try to move a DC from one SC to another SC, in the same track.
    This track has all custom applications developed by my team. It happens that our custom applications were all in one Software Component, and we want to have one SC per application.
    I followed the steps described in SAP Note 888969(and also this tutorial: http://wiki.sdn.sap.com/wiki/display/JDI/StepbyStepguidetoMoveaDCfromoneSCtoanother).
    I could successfully Integrate all components of the DC in the new Software Component. Then I did check-in and activated it. Everything fine so far.
    In the last step of copy/create the .dcref file in the TOP-Level DC folder, I did as described: have created an empty file with the same name and extension as the existed file on the old SC (new activity created). Then I checked in and on Activation phase I get an error: "Error! The following error occurred during request processing.  /gems/clock' is already active in the compartment 'GEMS' and cannot be activated in the compartment 'ESS_CLOCK_IO'.
    Does anyone had this problem before or have an idea how I can fix this problem?
    Thank you in advance,
    Regards

    For future search:
    I can suggest the movedc command of the guide
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30d8e1f6-a372-2b10-65af-8a366b91eba7
    Regards,
    Ervin

  • If I already have a particular app under one apple Id and I purchase the same app under a different Id for the same device, will it overwrite or replace the previous or will I have two of the same app on the same device??

    If I already have a particular app under one apple Id and I purchase the same app under a different Id for the same device, will it overwrite or replace the previous or will I have two of the same app on the same device?? 
    I'm asking because I purchased an app with an id that has been cancelled so I cannot update that particular app. I can purchase the app with my new id but I don't want to do so if its going to erase all the data I have with the previous purchase...

    Figured it out. Thanks.

  • "Open with..." displays n times the same lot of applications

    Hi,
    Right-Click in a document file,
    Select to watch the list of available applications,
    ba-da-boom: I have four times the same list of available applications!
    Say - if the item is a html file - I get Firefox four times (and TextEdit four times and...).
    Why ?
    Emile

    Hi Em,
    Your launch service .db needs a flush.
    Open terminal - Utilities and copy paste the below.
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister \ -kill -r -domain local -domain system -domain user
    Cheers,
    Karl.

  • 2 times the same app..

    Hello,
    i baught the Coyote Europe 2 times in 1 minute, is it possible to cancel 1 of the 2 items? It is 2 times the same app 49,99 euro that it on my account...

    You can contact iTunes support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • I am having problems with my EE signal on my iphone 5 - sometimes "no service" or just one bar up - anyone else having the same problem?

    I am having problems with my EE signal on my iphone 5 - sometimes "no service" or just one bar up - anyone else having the same problem?

    Hello there, alisonwayne.
    The following Knowledge Base article provides some in-depth steps for troubleshooting your issue:
    iPhone: Troubleshooting a cellular data connection
    http://support.apple.com/kb/ts3780
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • When putting an event on my iPhone calendar and the time, when it goes to iCloud to my laptop or iPad calendar the times are different.  How can I make the time the same?

    When putting an event and the time on my iPhone calendar, when it goes to iCloud to my laptop or iPad calendar the times are different.  How can I make the time the same?

    Welcome to the Apple Community.
    Is the calendar you are adding events to on the phone an iCloud calendar.

Maybe you are looking for

  • App World Availabili​ty

    Why up to now the app world is not available in oman, ME. As always the regular answer will appear that in future the app world shall be available but now the population of BB users is increasing and we are facing so much difficulties updating or dow

  • Call without turning on the speakerphone

    When I make a call with my iphone 5 I recently bought, the person I call can only hear me if I turn on the speakerphone.

  • Urgent : Oracle 8 Export Error

    Dear Sir, I have Oracle 8.0.4.0.0 server edition running on Windows NT Server Platform. From one week before i can't export the database.When i write the following command 'EXP80 username/password File=<filename.dmp> buffer=80000 log=<a.log> then fol

  • Debugging with Eclipse Plugin using Weblogic 6.1

    I am having a problem debugging using Eclipse 2.1 and the weblogic server plugin provided by this site. If I start the server and run the application everything works fine. If I put a breakpoint into my code and then run the application I do not see

  • Adobe Tech Comm Content Strategy and Tools Survey & more prizes!

    We are pleased to announce the launch of "Adobe Tech Comm Content Strategy and Tools Survey!"  The purpose of this survey is to understand how you create content, collaborate with peers, and distribute the content to end users. We want to understand