+ Reply to Thread
Results 1 to 7 of 7

Data model many to many relation - incorrect results

  1. #1
    Registered User
    Join Date
    10-21-2020
    Location
    Vienna
    MS-Off Ver
    Office 365
    Posts
    7

    Data model many to many relation - incorrect results

    Hey guys,

    I'm pretty new to the data model and kinda curious about the relations possible within the data model.

    For my current project, I need to be able to use data out of 40 (short) Tables with identical columns with a pivot table.

    The Columns for each table are MONTH, STAGE, Number of CANDIDATES.

    Despite not fully understanding the foundation of the data model relations, I figured out I need many to many relations. Therefore I added two unique tables for month and for stage (MONTHUNIQUE, STAGEUNIQUE) an connected the with my 40+ tables.

    But when trying to set up a pivot table using these connections excel shows the same values for every column.DiagramView.JPG

    PivotView.JPG

    What am I doing wrong? Would be grateful for any advice!

    Thanks in advance!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Data model many to many relation - incorrect results

    Hi and welcome to the forum

    Pictures are of little value. Honestly, no one wants to re-type your data to try and solve your issue. Additionally, we would only be guessing at how your data was structured, ie. formulas, formatting, etc. Additionally, due to how some browsers behave, many of our members cannot see uploaded pictures/images. Please do not take this route.

    Please attach a sample file that represents what you have. The structure of your attachment should be the same structure as your actual data. Any proprietary information should be changed.

    Include in the attachment any code you're currently using (whether it works or not) and an "After" of what you wish the output to be.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    10-21-2020
    Location
    Vienna
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Data model many to many relation - incorrect results

    Hey,
    sorry, im not yet familiar with the best practice for this forum.

    Here's my updated file
    Attached Files Attached Files
    Last edited by pwaccs; 11-26-2020 at 10:58 AM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Data model many to many relation - incorrect results

    Cannot see your source data in the file presented. Also, you have not shown what your expected results should look like as requested in the yellow banner. Help us to help you by giving us the full story.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Data model many to many relation - incorrect results

    The Candidates data type is Text, Please use Power Query and change the data type to Number.

    To demonstrate, I add a calculated column =value(IT[Candidates]) to convert text to Number.

    can.png
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-21-2020
    Location
    Vienna
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Data model many to many relation - incorrect results

    Hey Bo_Ry,

    thanks a lot for the reply!

    I changed the format to whole number through the query.

    Here's the correct file.
    Attached Files Attached Files

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Data model many to many relation - incorrect results

    Create relationships with T1 and use sum of Candidates

    2020_11_26_22_21_02_Test_1_.xlsx_Excel.png
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Gap Analysis / Incorrect results.
    By Ceetrix in forum Excel General
    Replies: 3
    Last Post: 08-06-2019, 10:24 AM
  2. Search and display results in userform Issue. Results are incorrect
    By olypro in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2019, 10:16 AM
  3. Incorrect excel data table results
    By pisco in forum Excel General
    Replies: 0
    Last Post: 08-21-2015, 04:38 AM
  4. [SOLVED] Some incorrect results from a formula
    By spittingfire in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-09-2015, 08:25 PM
  5. [SOLVED] Forumula Results Incorrect when data missing. Wanting to hide the incorrect formula.
    By firemedic6265 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-05-2014, 05:01 PM
  6. Simulation Model for Football Results Prediction
    By steviedwex in forum Excel General
    Replies: 3
    Last Post: 05-23-2011, 08:29 AM
  7. Replies: 2
    Last Post: 07-30-2005, 04:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1