Many To Many relationship, Distinct Aggregate issue

Hi, 
I need some help pleeeaaase... 
Ok, so i'm implementing a GL cube, and i have a bunch of accounts which can be aggregated to different levels of a parent child hierarchy, because i'm using a parent child hierarchy SSAS does a distinct "sum" to the Fact table, and so my Totals
get a bit messed up... 
So, i've tried looking for way to turn off this feature, but couldn't find one.
The alternative which i'm also stuck on, which is to create a member which goes to the child level, for each total, and re-aggregates ALL the values that are there.
I seem to have created a member in an MDX query that works perfectly... yay!, BUT when i put this into a calculated member... well it goes pear shaped, and i can't understand how it arrives at the number.. 
Please shout if my explanation is a bit sketchy..
Here is the code.
MDX Query....
WITH MEMBER [Measures].CurrentBalanceActualDecendants
AS 
SUM(
                       EXCEPT(
                                  DESCENDANTS([Dimension Report Detail].[Finance Report Hierachy].CurrentMember, 2, BEFORE),
                                  [Dimension Report Detail].[Finance Report Hierachy].CurrentMember
                     [Measures].[Current month Actual]
MEMBER [Measures].[BalanceTestc]
AS( IIF (
                     [Measures].CurrentBalanceActualDecendants = 0, 
                     [Measures].[Current month Actual],
                     [Measures].CurrentBalanceActualDecendants
SELECT {[Measures].[Current month Actual],
[Measures].[BalanceTestc]}
on 0
DESCENDANTS([Dimension Report Detail].[Finance Report Hierachy].&[4], 3, BEFORE)
--[Dimension Report Detail].[Finance Report Hierachy].Allmembers
)on 1
FROM [opfinanceGLTransaction]
WHERE { [Dimension Snapshot].[Date Value].&[2014-06-30T00:00:00],
[Dimension Snapshot].[Date Value].&[2014-05-31T00:00:00],
[Dimension Snapshot].[Date Value].&[2014-04-30T00:00:00],
[Dimension Snapshot].[Date Value].&[2014-03-31T00:00:00],
[Dimension Snapshot].[Date Value].&[2014-02-28T00:00:00],
[Dimension Snapshot].[Date Value].&[2014-01-31T00:00:00]
CALCULATED Measure.......
CREATE MEMBER CURRENTCUBE.[Measures].[Current Month Actual]
 AS IIF(
                     [Measures].CurrentmonthActualDecendants = 0, 
                     [Measures].[Balance],
                     [Measures].CurrentmonthActualDecendants
VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'Fact GL Transaction';   
CREATE MEMBER CURRENTCUBE.[Measures].CurrentmonthActualDecendants
 AS AGGREGATE(
                       EXCEPT(
                                  DESCENDANTS([Dimension Report Detail].[Finance Report Hierachy].CurrentMember, 2, BEFORE),
                                  [Dimension Report Detail].[Finance Report Hierachy].CurrentMember
                     [Measures].[Balance]
VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'Fact GL Transaction';        

Have you seen the "Multiple Parent-Child Hierarchies" design pattern in this paper:
http://www.sqlbi.com/articles/many2many/
I'm wondering whether you really need such MDX.
Marco Russo (Blog,
Twitter,
LinkedIn) - sqlbi.com:
Articles, Videos,
Tools, Consultancy,
Training
Format with DAX Formatter and design with
DAX Patterns. Learn
Power Pivot and SSAS Tabular.

Similar Messages

  • Many to many relationship issue

    Guys,
         How do we deal with the situation where we have many to many relationship between 2 different characteristics?
    Thanks,
    RG

    Hi,
    I assume you are talking about data modeling.
    When you are required to decide how to model two Char with many to many relations
    1. If you keep them in Same Dimension table the size of the dimension table will be more.
    lets say 100 Customers & 100 Materials
    Now if you keep them in same dimension..
    lets say C1 will have combination of M1 till M100.similarly for other customers
    So Total rows in dimension table will be 100x 100 = 10000!!!
    It will again be of comparable size to fact table and not recommended.
    2.You always try to define them in different dimensions
    Now ,You try keeping them in diffrent dimension..in this case Customer dimension will have only 100 rows & Mateial dimension will have only 100 Rows.very small when compared to fact table size.
    Hope this helps
    Sriman

  • One to Many Relationship Issue

    Post Author: jmb1977
    CA Forum: Formula
    I am having a problem in which I have a one to many relationship with contact phone numbers and students. In other words, one student can have multiple contacts. (I work for a school district)
    I made up two formulas...called Contact1Phone and Contact2Phone.
    Here is the code I use to display the data:
    IF {STUDCTCT.CNTNUMBER} in ["C1"] THEN STDUCTCT.CNTWPHONE
    Then the other formula does the same, except uses "C2".
    What I get is either C1 or C2 displays, but never both for the same student. Anyway to make this work? Any help on this would be greatly appreciated!

    Post Author: jmb1977
    CA Forum: Formula
    I forgot to add, I do know that placing STUDCTCT.CNTNUMBER in [C1,C2] as a selection then just simply place the CNTWPHONE field into the details section of the report will give me the results. But the reason why I am trying it the other way is that I can export the data as one record per student, thus I am trying to put the fields and formulas into the group section.

  • Newbie: one to many relationship SQL error

    Greetings all-
    This is probably a slam dunk for you JDO experts. I'm a JDO newbie, working
    with an existing schema in MySQL. I have a one to many relationship between
    two tables:
    Table "company":
    Fields:
    company_id: int(11) -- primary key
    name : varchar(64)
    division : varchar(64)
    Table "company_products"
    Fields:
    company_id: int(11) -- foreign key to table company
    product_name: varchar(64)
    product_description: varchar(64)
    So, I created the corresponding classes:
    public class Company {
    private int companyID;
    private String company_name;
    private String division;
    // Array of CompanyProduct
    private ArrayList companyProducts;
    // .. methods omitted
    public class CompanyProduct {
    private int companyID;
    private String productName;
    private String productDesc;
    // Methods omitted
    Then I created the "package.jdo" file:
    <?xml version="1.0"?>
    <jdo>
    <package name="com.packexpo.db">
    <class name="Company">
    <extension vendor-name="tt" key="table" value="company"/>
    <extension vendor-name="tt" key="pk-column" value="company_id"/>
    <extension vendor-name="tt" key="lock-column" value="none"/>
    <extension vendor-name="tt" key="class-column" value="none"/>
    <field name="companyID">
    <extension vendor-name="tt" key="data-column" value="company_id"/>
    </field>
    <field name="name">
    <extension vendor-name="tt" key="data-column" value="name"/>
    <extension vendor-name="tt" key="column-length" value="64"/>
    </field>
    <field name="division">
    <extension vendor-name="tt" key="data-column" value="division"/>
    <extension vendor-name="tt" key="column-length" value="64"/>
    </field>
    <field name="companyProducts">
    <collection element-type="com.packexpo.db.CompanyProduct"/>
    <extension vendor-name="tt" key="inverse" value="companyID"/>
    </field>
    </class>
    <class name="CompanyProduct">
    <extension vendor-name="tt" key="table" value="company_product"/>
    <extension vendor-name="tt" key="pk-column" value="company_id"/>
    <extension vendor-name="tt" key="lock-column" value="none"/>
    <extension vendor-name="tt" key="class-column" value="none"/>
    <field name="companyID">
    <extension vendor-name="tt" key="data-column" value="company_id"/>
    </field>
    <field name="productName">
    <extension vendor-name="tt" key="data-column" value="product_name"/>
    <extension vendor-name="tt" key="column-length" value="64"/>
    </field>
    <field name="productDesc">
    <extension vendor-name="tt" key="data-column"
    value="product_description"/>
    <extension vendor-name="tt" key="column-length" value="64"/>
    </field>
    </class>
    </package>
    </jdo>
    Enhancement works fine. I successfully query and retrive Company objects
    from the database, but as soon as I try to get the list of CompanyProducts,
    I get an SQL Error:
    javax.jdo.JDODataStoreException: [SQL=SELECT company.COMPANYPRODUCTSX FROM
    company WHERE company.company_id = 82061]
    E0610 Error in executeQuery()
    E0606 executeQuery() error --
    E0701 Error in getResult().
    E0708 Command results in error - 1054 Unknown column
    'company.COMPANYPRODUCTSX' in 'field list'
    NestedThrowables:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=SELECT
    company.COMPANYPRODUCTSX FROM company WHERE company.company_id = 82061]
    E0610 Error in executeQuery()
    E0606 executeQuery() error --
    E0701 Error in getResult().
    E0708 Command results in error - 1054 Unknown column
    'company.COMPANYPRODUCTSX' in 'field list'
    I know i have probably set up the package.jdo file incorrectly, but I'm at a
    loss for what I did wrong.
    Any suggestions?
    Thanks!
    -Mike

    Hi,
    915766 wrote:
    I need to write sql for below requirement:
    table structure is
    serial no LPN
    1 4
    2 4
    3 6
    4 6
    5 6
    6 3
    7 3
    8 3
    9 1
    I have to pick distinct 'LPN' like below:That sounds like a job for "GROUP BY lpn".
    (any serial no can be picked for the distinct LPN)It looks like you're displaying the lowest serial_no for each lpn. That's easy to do, using the aggregate MIN function.
    results needs to be as below:
    serial no LPN
    1 4
    3 6
    6 3
    9 1
    Please suggest with sql.Here's one way:
    SELECT    MIN (serial_no)   AS serial_no
    ,         lpn
    FROM      table_x
    GROUP BY  lpn
    ORDER BY  lpn     -- if wanted
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}

  • ONE-to-MANY relationship between tables and forms in APEX

    I recently started using APEX and I have run into an issue.
    I have a ONE-TO-MANY relationship between two tables, A1 and A2, respectively.
    A1:
    A1_ID
    Item
    A2:
    A2_ID
    SubItem
    A1_ID
    I have 2 forms (lets call it F1 and F2) that I use to capture data for A1 and A2.
    On F2, I have the following fields that are setup to capture data:
         A2.A1_ID
    **A1.Item (this is a drop down that is populated using a SELECT statement where the select uses A1.Item field)
         A2.SubItem (user would enter SubItem)
    Note: A2.A2_ID is populated using a SEQ
    Everytime I pick **A1.Item on F2, is there a way to link to A1 table and display A1.A1_ID for every **A1.Item selected on F2?
    If so, I want to store the value captured in F2 for the A1_ID field into A2 table to maintain my 1-to-MANY relationship.
    If this will work, how do I go about implementing this solution?
    Can someone help me?

    I think it sounds like you are asking for a Master-Detail form. Try that and see what you get.
    chris.

  • Many to Many Relationship

    In powerpivot we are facing problem in resolving the many-to-many relationship between tables.
    Current table schema is:
    Having 4 tables-
    Bills - columns are- Bill No(primary key)
    Billing Fee Table-Fee ID(primary key), Bill Type, Sub Bill Type
    FeeList Table-FeeList ID(primary key),Fee ID(Foriegn Key to Billingble),
    Bill No(Foriegn Key to Bills)
    Payments Table-Pay ID(Primary Key), Bill No(Foriegn Key to Bills)
    Bills is the primary table for Feelist Table
    and Payments Table -Bill No is the primary key.
    Billing Fee Table is primary table for FeeList Table -
    Fee ID is the primary key.
    To create a pivot table using Payments Table, I need
    Bill Type and Sub Bill Type. Hence fetched from
    Biling Fee Table to FeeList Table based on the
    Fee ID column using RELATED function.
    As FeeList Table and Payments Table is having duplicate
    Bill Nos, it is not possible to get Bill Type and
    Sub Bill Type to Payments Table. I am trying to use LOOKUPVALUE
    function to get data based on the Bill No, as there is no direct relationship exists between these two tables.
    I have tried using
    =LOOKUPVALUE('FeeList Table'[Sub Bill Type], 'FeeList Table'[Bill No], 'Payments Table'[Bill No]) function. But
    the lookupvalue function returns an error if a duplicate is found.
    Error is as below:
    Calculation error in column 'Payments Table'[Sub Bill Type]: A table of multiple values was supplied where a single value was expected.
    Kindly assist to resolve this issue.
    Thanks

    Hi Rekha,
    What should your LOOKUPVALUE return if multiple rows are found in the FeeListTable? By the way it should work if a really finds "duplicates" (i.e. multiple times the same return value) but fails if it returns multiple rows with different values.
    If you for example would want to return the first entry that was found, you could try (have not checked in PP for typos):
    CALCULATE(MIN('FeeList Table'[Sub Bill Type]),
      FILTER('FeeList Table',
         'FeeList Table'[Bill No] = 'Payments Table'[Bill No]
    Edit: a very nice way to handle Many-to-Many relationships is explained here:
    http://blog.gbrueckl.at/2012/05/resolving-many-to-many-relationships-leveraging-dax-cross-table-filtering/
    Julian Wissel | BI for NAV @ http://en.navbi.com | Blog @ blog.navida.eu

  • Many to many relationship does not work on certain role played dimension

    Hi,
    I have a cube with role playing Account dimension, used once as “Account” and once as “Other Account” dimension.
    I’ve added Trip dimension related to the account dimension by a bridge table AccountTrip 
    making a many to many relationship (many accounts can be in one trip and one account can go to many trips).
    When I added the bridge measure group to the cube, I saw in the dimension usage tab that the relationship between the bridge and the Account dimension was done automatically.
     I added the trip dimension with regular relationship to the bridge measure group and many to many relationship to the main fact table using the bridge group.
    All compiled fine and gave correct results. Then I noticed that when slicing the fact table by the Other account dimension I get correct results,
     but when I add the Trip dimension I get the results as if I was slicing by the Account dimension, not by the “Other account” dimension.
    I checked the cube and noticed I did not set the relationship between the bridge to the “Other Account” dimension (role playing). I set it now (regular relationship, same as the account dimension), but still getting the same results.
    Conclusion-  when slicing by the new Trip (M2M) dimension and the “Other Account”
     (role played) dimension I get the results of the “Account” dimension, not those of the “Other Account” dimension.
    I checked the relationships of the “Other Account” dimension in the cube but it looks correctly set (to the external account of the main fact table and to account of the bridge table).
    (Just to note I have two other bridges on the cube which are not related and don’t look like they need to be related, plus two other measure groups of the main fact table used for distinct count which are related appropriately).
    What else should be done???
    I would greatly appreciate your help!
    Thanks
    Namnami

    The update server is down; try this temporary workaround
    App Store>Purchased>Select "All"
    Note: Look out for apps that have the word "Update"
    http://i1224.photobucket.com/albums/ee374/Diavonex/9c256282736869f322d4b3071bbb2 a82_zps51a6f546.jpg

  • Hierarchical query with many-to-many relationship

    I have read with interest the creative solutions to complex hierarchical queries posted previously; they have been instructive but have not quite addressed this scenario.
    We have a hierarchy table H, with columns for ID, name, parentID, and other attributes.
    Within this table are a number of independent hierarchies, each existing for a different purpose.
    We have a master list of hierarchies in table T which describes the purpose of each hierarchy, provides some default attributes which the nodes can inherit, and stores a unique id for each hierarchy and a pointer to the root node of the corresponding hierarchy in table H.
    We have a master list of items M, with identically named columns to those in H, along with many other attributes.
    The members of table M ALL belong to EACH of the Hierarchies. So we have a link table I to define the intersection of H and M.
    So the leaf nodes of H are really containers for the list of elements from M which may be attached to them.
    The universe of M is very volatile, with new members being added, old ones deleted, and existing ones being reclassified frequently from node to node within each hierarchy. Since the hierarchies have to be built to handle every possible scenario, so that the members of M can always find a suitable node to reside in, quite often, in fact more often than not, the majority of leaf nodes for each hierarchy are empty at any given moment.
    Therefore, although we always know the root sector of a given hierarchy and can traverse downwards from there, if we worked our way up from the intersection table, we could eliminate up to 70% of the nodes of any given hierarchy from further consideration, as they don't need to be (in fact, must not be) included in reports.
    As implied by the above, rows in M are structurally similar (in terms of columns, but not in any real world sense) and are a superset of rows in H. But combining them into the one table doesn't seem to help the reporting process due to the many-to-many relationship which prevents the ID/parentID relationship from being carried through to this level.
    There are a number of other considerations of which the most pertinent is that the people using this database generally have an interest in only a subset of the master list of items in M. This relationship is also dynamic but important enough and rigid enough that another link table P exists to combine the Users in table U with the subset of M in which they are interested. (The users are also grouped into hierarchies of a totally different nature, but this aspect is secondary for now.)
    The reporting is reasonably straightforward for any single combination of User and Hierarchy; they want to see all the items they are interested in, listed in hierarchical sequence, totalled on change of level with the individual items M listed beneath the nodes of H. This is unfortunately required in real time, so retrieval performance is paramount.
    Some statistics might help to determine the optimum approach:
    The largest hierarchy has 10,000 nodes. The smallest about 100.
    The largest would have 70% or more of its nodes unused at any point in time, and even the smallest would have 25% unused.
    The hierarchies tend to be broad rather than deep, the maximum number of levels being about 5; but the larger ones should be twice as deep as this if performance was not compromised.
    There are dozens of hierarchies, but it may be possible to sharply reduce this number by exploiting the Order Siblings By clause.
    The number of rows in M varies between 500,000 and 50,000; depending upon how long historical data is retained on-line (and performance permitting, it would be retained indefinitely).
    The number of users varies between 1000 and 2000 but the range of M in which they are interested varies greatly; from as few as 100 to as many as 10,000+. So it is almost always worth beginning by eliminating the items in which they are not interested, implying once again that the hierarchy should be traversed upwards rather than down from the root.
    The current system is very old and survives by a tactic of building what are essentially materialised views of the database structure for each user overnight using, ahem, non-relational technology. This is inefficient and not easily scaled (but it works) and hence this redevelopment project needs to (a) work, and (b) work better and faster.
    I am happy to provide some DDL scripts if that helps explain the problem better than this narrative.
    I can't help feeling that the solution lies in somehow extending the hierarchical query past the many-to-many link table so that the Master list can be merged directly into the hierarchy such that the M items become the leaf nodes rather than the design outlined above - but I don't know how to do that. But I am sure everyone reading this does! :)
    All advice appreciated. Database version is not an issue; we are currently using version 10XE for experimentation, but production usage could be on 11 if that contains helpful features.
    Thank you
    CS

    Hi,
    ChrisS. wrote:
    I am happy to provide some DDL scripts if that helps explain the problem better than this narrative.Yes, please do.
    The problem seems interesting, I'm sure many people here (including myself) are willing to help you in this matter.
    So yes, post DDL for the tables, as well as INSERTs to populate them with representative data. Please also include the output you require along with detailed explanations about the logic to get it.
    Don't forget to put lines of code between &#x007B;code&#x007D; tags in order to preserve formatting and readability, like this :
    SELECT sysdate FROM dual;Thanks.

  • How to design many to many relationship in the fact and dimension

    There is a problem in my project what is the subject.And i wanna know how to implement in owb.I use the warehouse builder 10. Thanks.

    You may design and load whatever db model you want to.
    But If you set a unique key, you may find some integrity issues. I wouldn't do a many to many relationship between facts and dimensions. This could cause you lots of headaches when users start to submit queries using this tables. You'll probably face performance issues.
    Regards,
    Marcos

  • Portal Form for a Many to Many relationship

    I have 3 tables (well there are actually more but i'm glad when i can do the trick with 3 at the moment):
    T_JOURNAL (JOURNAL_ID, JOURNAL_NAME)
    T_CONTENTBROKER (CONTENTBROKER_ID, CONTENTBROKER_NAME)
    HT_JOURNAL_CONTENTBROKER (JOURNAL_ID, CONTENTBROKER_ID)
    The HT stants for 'help table'. T_JOURNAL and T_CONTENTBROKER have a many to many relationship. So one Journal can have many Broker and one Broker has many Journals.
    When doing a Form in Oracle Portal for adding a new Journal, i'd like to have a LoV with the Brokers. But an new entry would at least require 3 tables to update (T_JOURNAL, T_CONTENTBROKER and the help table HT_JOURNAL_CONTENTBROKER). How can this be solved? i'm not very good with pl/sql... so if there is only a solution with pl/sql i would be glad for the code...
    I also tried to create a view wich would show me the journal with all its broker but i kind of failed...
    any suggestions appreciated ;)
    - renato

    Thanks for the info. I tried that and it still doesn't pull the value. I have opened a TAR via metalink, but I'm not getting any
    satisfactory answers. I ran across an note - 137172.1 that has this snippet of information in it.
    Unfortunately, at this time (portal 3.0.7.6.2) , a non-table item cannot be
    referenced in a plsql event handler, only in client side JavaScript code. This
    is a known limitation and will be fixed in a future release.
    I don't know how to get the value from the client side JavaScript code to a pl/sql variable. Do you?
    I've been trying to get them to tell me if the 'known issue' has been addressed in 3.0.9.
    I'll keep at it. Thanks so much for your suggestion I appreciate it.
    Deb

  • SSAS - Many to Many Relationship Grain Filters Out Data (Many to One)

    I have a simple Many to One example: One Fact Table record has many Dimensional Items.  The Example I'm using is One FactEvent record can have multiple EventMembers.  These members are always unique so the relationship is really many to one (vs.
    many to many). The grain of the Fact is one row for every event.  Not all events have members, but I have stubbed those with -1
    I tried using a Referenced dimensional relationship, but it threw my total counts off.  I decided to make it more complicated by using a
    Many to Many relationship, but I had issues once I started slicing the data.
    The following are my two very simple tables:
    FactEvents:
    EventMemberID MemberKey EventMemberKey MemberName MemberGender
    1             1         -1             None       N          
    2             2         E2             Tyler      M          
    3             3         E2             John       M          
    4             4         E2             Sue        F          
    5             5         E5             Tim        M          
    6             6         E5             Jane       F          
    7             7         E12            Ashley     F          
    8             8         E12            Jessica    F          
    9             9         E12            Kristy     F          
    10            10        E17            Mike       M          
    11            11        E17            Josh       M          
    12            12        E18            Warren     M          
    13            13        E18            Eric       M           
    Here is the bridge Table:
    EventID EventBK EventName         EventMemberKey EventCount
    1       E1      Hockey Game       -1             1          
    2       E2      Soccer Game       E2             1          
    3       E3      Baseball Game     -1             1          
    4       E4      Concert           -1             1        
    5       E5      Food Festival     E5             1          
    6       E6      Movie Night       -1             1          
    7       E7      Data Group Event  -1             1          
    8       E8      City Tour         -1             1          
    9       E9      Ski Trip          -1             1        
    10      E10     Camping Trip      -1             1          
    11      E11     Hiking Trip       -1             1          
    12      E12     Community Cleanup E12            1          
    13      E13     Block Party       -1             1          
    14      E14     Toastmasters      -1             1          
    15      E15     Train Spotting    -1             1          
    16      E16     Plane Spotting    -1             1          
    17      E17     Fishing Trip      E17            1          
    18      E18     Hunting Trip      E18            1          
    19      E19     Street Hockey     -1             1          
    20      E20     Bonspiel          -1             1          
    You can see many events have no members and some events have multiple members.  There is not separate members Dim, just the bridge table.  I tried to build view that would work as bridge tables, but it started to feel like overkill.
    Here is the SSAS structure:
    Cube:
    I tried creating a bridge Dim and Measure Group that can be used to join FactEvents with DimMemberEvent:
    When I query the database tables directly, I can get the structure I'm looking for:
    Gender  Count
    F            5
    M           7
    N           15
    This represents that although there are 20 events, there were 5 Female and 7 Male participants and 15 events with No participants.  When looking at the cube in excel I get:
    Gender  Count
    F            3
    M           4
    N           15
    Grand Total 20
    The grand total is correct, however, it looks like it is grouping the events, so if there are multiple Female members at a particular event, they get rolled up.  You can see this better if I pull in member name:
    It includes all the names with count 1 ie. 5 Females with count 1, but the gender subtotal is 3 (as it is grouping the gender dimension)
    The detail member counts are good, but the rolled up M and F counts are stripping out duplicates.  Is there a way to model this in SSAS to preserve the detail member counts when the member dimension is used?  Is a many to many the best solution?
    This is all using SQL Server 2012 Multi-Dimensional Model. Thanks.

    Ok, for starters, if it's a one to many relationship, don't set it up as a many to many!  Avoid many to many relationships and really anything other than "regular" relationships. 
    Second, the tables you pasted the data for aren't the tables you are describing them as, based on the dsv screenshot you included.  If your post is confusing to the people who are wanting to help you, they will quickly move on.
    It seems that you are not clear on how to construct a star schema.  I will lay one out for you and hopefully this can help you on your journey.
    fact_member_event:
    event_id
    member_id
    member_event_count
    dim_member:
    member_id
    member_key
    member_name
    member_gender
    dim_event:
    event_id
    event_name
    fact_event:
    event_id
    event_count
    Or alternately, you could drop the fact_event fact table and have a calculated member that uses dimEvent.event.event.allmembers.count.  It's a little bit of a weird situation that I would want to play with, but I would start with the above.  
    Also if you post back and show query results, you should make it clear what columns  you are displaying.  I see "count" in your query above, but nowhere in the star schema do I see "member count"
    as a field.. I guess that's event count?
    Hope this helps,
    Ken

  • WCF RIA entity Update from Lightswitch for Many to many relationship

    I have two entities which have many to many relationship. I need to create a screen to update data from both the tables simultaneously using a screen. So I used First as a sql database entity in Lightswitch second is RIA service Entity(Which is junction table).
    both tables are editable in a same screen but when I click on Save button,
    System call to
    [Query(IsDefault = true)]public IEnumerable<EquipmentJob> SelectFakeJobs()  
    method instead of calling
    [Query]public IEnumerable<EquipmentJob> SelectJobs(long? ID).
    I am using the Ria table as a query in my screen and setting the parameter as a table1.SelectedItem.ID.  But after click on save it does not call to parameterized
    method to get data. I have already implemented the 'Saving' method.  It gives following exception.
    Only changes to a single data service can be saved.  To save changes to multiple data services, implement the "Saving" method.
    Data conflict. another user has deleted the record.
    I followed following link to setup the Many to Many relationship update in LightSwitch
    http://powerbala.com/many-to-many-control-for-microsoft-lightswitch/

    Only changes to a single data service can be saved.  To save changes to multiple data services, implement the "Saving" method.
     This issue is discussed before, generally you need implement the <ScreenName>_InitializeDataWorkspace method and add the data services that you'd like to save to the saveChangesTo list.
    https://social.msdn.microsoft.com/Forums/en-US/238e5e91-8598-42f9-817d-12b6f5b980a1/having-a-problem-saving-getting-error?forum=lightswitch

  • Need example of adding attributes for many-to-many relationship

    Hi,
    Looking for examples of mappings and update code for many-to-many relationships with attributes.
    There is a doc in Metalink:206971.1 that says that it can be done but no examples are shown.
    Would realllly appreciate any help you can provide.
    Cheers,
    Nim

    Extended Many to Many Question
    Really there isn't any code to show. The recommendation is to create a class to represent the relationship. See link above for more details on the issue.
    - Don

  • Siebel BI Publisher Report having many-to-many relationship

    I have query on creating BI publisher reports having many to many relations. The report requirements has fields from entities Customer, Claims and Payments. For explanation let say fields are customer name, claim ref, payment amount, pay id. claims and Payments entity has many to many relationship. Now my report shows as below. Actual Total Amount Paid to customer is 11,500. However my report total is shown as 13,000. How to resolve this ?
    Customer Name Claim Ref Payment Amt Pay Id
    Mr XYZ 1001 10,000 1-101
    Mr XYZ 1001 1500 1-102
    Mr XYZ 1002 1500 1-102
    I was thinking about a solution of having two columns side by side within a page. Column left will the show the data Customer to Claims and Column right will show the data Customer to Payments. But not sure how to achieve the rows wise alignment for the new customer records between two columns. If row wise alignment achieved then hope workaround might be accepted by client. Any help in this is greatly appreciated

    Thanks for the reply. The many to many relationship between Claims and Payments are achieved through intersection table in siebel. When Customer has multiple claims, single payment issued for both claims. Also single claim can multiple payments such (part compensation, interests, final compensation etc)

  • Many to Many Relationship using junction table..

    Hello im testing a many to many relation ship on j2ee and found this issue.
    Creating a relation ship table until now without succes to update the relationship table:
    code fragment as is:
    On application flow my session bean call the following method according with the specification i have no reason to call persist in my writer just on parent Object: Any clue on what is wrong ?
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public void saveWriter (Book book , Writer writer){
    try {
    Book atBook = entityManager.merge(book);
    Writer atWriter = entityManager.merge(writer);
    book.getWriters().add(atWriter);
    entityManager.persist(atBook);
    entityManager.flush();
    }catch (Exception ex)
    ex.printStackTrace();
    <entity class="com.octech.biblio.domain.Book" name="book">
    <description></description>
    <table name="books" />
    <attributes>
    <id name="id">
    <generated-value strategy="IDENTITY"/>
    </id>
    <basic fetch="EAGER" name="bookName">
    <column insertable="true" length="128" name="bookname" table="" updatable="true"/>
    </basic>
    <many-to-one name="Library" fetch="LAZY" target-entity="com.octech.biblio.domain.Library">
    <join-table name="library_books">
    <join-column name="books_id"/>
    <inverse-join-column name="library_id"/>
    </join-table>
    <cascade/>
    </many-to-one>
    <many-to-many name="Writers" fetch="LAZY" target-entity="com.octech.biblio.domain.Writer">
    <join-table name="writers_books">
    <join-column name="books_id"/>
    <inverse-join-column name="writer_id"/>
    </join-table>
    <cascade/>
    </many-to-many>
    </attributes>
    </entity>
    <entity class="com.octech.biblio.domain.Writer" name="writer">
    <description></description>
    <table name="writers" />
    <attributes>
    <id name="id">
    <generated-value strategy="IDENTITY"/>
    </id>
    <basic fetch="EAGER" name="writerName">
    <column insertable="true" length="128" name="writer_name" table="" updatable="true"/>
    </basic>
    <many-to-many name="Books" fetch="LAZY" target-entity="com.octech.biblio.domain.Book">
    <join-table name="writers_books">
    <join-column name="writer_id"/>
    <inverse-join-column name="books_id"/>
    </join-table>
    <cascade/>
    </many-to-many>
    </attributes>
    </entity>

    sybrand_b wrote:
    The way you write it yes, but there is one minor detail.
    You can have a 0,1 or many relationship: one employee has zero, one or many phone numbers
    but you can not have the opposite, as it doesn't make sense.
    0, 1 or many phone numbers belong to 1 employee.
    It is customary to use 0,1 or m when the relationship is optional.
    Sybrand Bakker
    Senior Oracle DBAIs this correct now ?
    one to many : one employee has 0,1 or multiple phone numbers
    many to one : 1 or multiple phone numbers to one employee

Maybe you are looking for

  • SAP MAP - Best Choices for Planning Technical Basis

    Hello, experts! For today there are 3 variants of MAP planning scenaries implementation: 1.Planning and reporting via MAP Business content for BI Integrated planning 2.Planning and reporting via MAP Business content for BPS 3.Planning in ECC based MA

  • Attempting to Share Folders om PC to make the Switch

    Hi, I have two computers connected directly to each other via ethernet: one mac and one PC. I am trying to to get files off my PC and although I've enabled sharing of my My Documents folder, when I access the folder from OS X I can see folders but th

  • Plug ins where to find them to upgrade them

    Running indesign 5.0 but have installed updates so I am assuming that it is now 5.5. I cannot open previous files. Gives error message need to update plugins where do i find the plug ins and how do i update them thanks Patti

  • SLES 10 - 11.5.10.2 - gcc and g++  - gcc_old

    Hi, I have 11.5.10.2 running on multiple boxes; database is 10.2.0.4 on SLES10 64 bit and forms/web/conc are on another box running SLES10 32 bit. The details of the operating system on the 32 bit SLES10 box is as follows: $ uname -a Linux boxcar 2.6

  • Backup strategy - how to user the vault?

    Hi there, Like everyone else, I also accumulated thousands of images with aperture. So my question is this: How can I backup my entire projects/images (both metadata and master)? I just bought a new external harddrive 500GB and would like to have the