+ Reply to Thread
Results 1 to 12 of 12

PowerPivot not working as intended?

  1. #1
    Registered User
    Join Date
    08-28-2017
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    8

    PowerPivot not working as intended?

    Hi, I seem to have this problem in Excel Pro Plus 2016. Well, I have this problem too for Excel 2013.

    I think this is probably something simple that I'm missing and I hope you can help me.

    I can't seemed to make the PowerPivot I've created reflect the many to many relationships correctly. Please have a look at the attached file and the steps I've written:

    1. Create lists of unique values - Buildings, Teams and Consultants
    2. Create relationship tables - Buildings-Teams and Teams-Consultants
    3. Added all the above to Data Model
    4. Used Diagram View to create relationships - mapped IDs to IDs in the tables
    5. Created PIVOT


    Problem:
    1. "Relationships between tables may be needed" keep appearing even though I've already created in step 2 above.


    2. PIVOT doesn't reflect what was expected ie. the relationships implied in the relationship tables (step 2 above). It seems to just populate every single Team-Consultant relation (which is correct btw) to each Building which is contrary to what is proposed in the Buildings-Team relationship table.


    Please please help - thank you very much!!


    Btw, just realised that I can't attach a file? Clicking the attachments button above brings up an empty box with no words/letters?

    Rgds,
    Michael
    Attached Files Attached Files
    Last edited by fingerstyle; 10-21-2017 at 06:59 PM. Reason: Sorry - just figured how to attached the file! :)

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: PowerPivot not working as intended?

    To attach an Excel file to your post,
    • click Go Advanced,
    • scroll down until you see Manage Attachments,
    • click that and select Browse,
    • select your file and click Open,
    • click Upload and you will see your attachment below Upload Files from a website
    • click Close this window,
    • click Submit reply

    After that you should see attachment in your post

  3. #3
    Registered User
    Join Date
    08-28-2017
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    8

    Re: PowerPivot not working as intended?

    Thank you for teaching me how to attach the file, sandy666!

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: PowerPivot not working as intended?

    Quote Originally Posted by fingerstyle View Post
    I can't seemed to make the PowerPivot I've created reflect the many to many relationships correctly.
    I see something different

    rel.jpg

    Would be fine to see result (mock up manually if necessary)

    maybe this one is what you want:
    Attached Files Attached Files
    Last edited by sandy666; 10-21-2017 at 10:21 PM.

  5. #5
    Registered User
    Join Date
    08-28-2017
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    8

    Re: PowerPivot not working as intended?

    Hi Sandy666,

    Thanks for coming back. I did a mock-up of what I was expecting to see, drawn up from the 2 relational tables in the same file. Please have a look. Thank you so much!!
    Attached Files Attached Files

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: PowerPivot not working as intended?

    Could you tell me any logical reason why it should be like in your last file?
    You've wrong relationship: Buildings Team (many) to Buildings (one) and the same table Buildings Team (many) to Team (one)
    Table Buildings Team should have any unique ID (no duplicates) but it doesn't.
    Look at table Team Consultant: Consultant ID (unique) and Team ID (duplicated) and it is ok.

    First what you need is build correct relationships then play with PivotTable but not vice versa

    Maybe read here: Relationships between tables in a Data Model or here: Relationships Overview

    cheers
    Last edited by sandy666; 10-22-2017 at 08:12 AM. Reason: added second link

  7. #7
    Registered User
    Join Date
    08-28-2017
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    8

    Re: PowerPivot not working as intended?

    Hi

    This is just dummy data, but I could provide some sorta logic for us

    So this data presents teams of consultants that have access privileges to certain buildings. For example, Rose is in Team TID002 which have access to Building 001 and 003.

    The relationship tables (ie Buildings - Teams, Teams - Consultants) have many to many relationships. The uniqueness is provided by separate tables of Buildings, Teams, and Consultants. I believe this works, having read from somewhere else on this. If I am not correct, please feel free to correct me. How should I then make the desired result happen?

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: PowerPivot not working as intended?

    You can analyze this file and change what you want but must remeber about unique (primary) key for each table
    and don't imagine PT but first build the correct relationship. If rels will be incorrect you will see warning in PT of course
    Attached Files Attached Files
    Last edited by sandy666; 10-22-2017 at 05:50 PM.

  9. #9
    Registered User
    Join Date
    08-28-2017
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    8

    Re: PowerPivot not working as intended?

    Hi Sandy666,

    Thanks for coming back!

    There is a slight problem though...

    Say, a new member joined and I'd like to add her (say her name is Lauren) along the prestigious ranks of Team TID001, which can access all three buildings (which I know from knowledge of this very simply 3 building example). So to add her, I'd input the BID, TID and her CID in the SRC tab you created. But, herein lies the issue - I will need to know what Building TID001 has access to in order to fill in her privileges. I wanted to be able to simple add Lauren to 1) Consultants list and 2) the Team-Consultant relational data; and the pivot will update accordingly because it should know, from my initial Buildings-Team relational data, that TID001 is able to access all three buildings. This is a very useful function - imagine if the data is such that there are hundreds of buildings with varying access rights!

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: PowerPivot not working as intended?

    So add three different CIDs for the same person then define TID and BID
    You can define one TID and two BID or whatever but if one person (Lauren) should have access to three different things she should have three different CIDs
    You can play with TIDs and BIDs in the rels table but CIDs should stay 3 different.

    and remember , we are talking about example not about your real data

    here is example
    Attached Files Attached Files
    Last edited by sandy666; 10-22-2017 at 08:26 PM.

  11. #11
    Registered User
    Join Date
    08-28-2017
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    8

    Re: PowerPivot not working as intended?

    Hi Sandy,

    Thanks again for the suggestion!!

    It looks strange.. it's like there are three Laurens (different IDs for each) in the company. Staff IDs are always just one for each staff. Can we not have a situation where, if you totally ignore CID017 and CID018, map CID016 to TID001?

    In other words, if Lauren joins the company today, I'd like to be able to say to the admin staff (who is not knowledgeable about which Team can access which building) to, "Put Lauren as part of Team TID001". Then, after a couple days, I am able to refresh the PowerPivot to see Lauren is now mapped to TID001, which is already set up to map to BID001, 002 and 003.

    Hope that makes sense! :D

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: PowerPivot not working as intended?

    I think this is what you want

    You can define Teams/Buildings/Consultants as you wish but in TBCID table ID must be unique {!}. (unfortunately 1st header and name of table are the same: TBCID but I'm too lazy to change it )
    If you do something wrong with TID/BID or CID in this table you'll see blank or red in PT (eg. duplicate rows values)
    Associate names to CIDs in TBCID table is not necessary

    morning is more wise than evening
    Attached Files Attached Files
    Last edited by sandy666; 10-23-2017 at 12:28 AM.

+ 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. [SOLVED] worksheet_Change event not working as intended.
    By Kramxel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2015, 04:00 AM
  2. Timed Macro not working as I intended
    By ufopilot in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2015, 03:39 AM
  3. Replies: 2
    Last Post: 06-02-2014, 09:34 AM
  4. [SOLVED] Msgbox not working as intended
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-24-2013, 09:12 AM
  5. [SOLVED] Nested if formula not working as intended
    By Reibie in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-11-2013, 05:59 AM
  6. [SOLVED] VLOOKUP not working as intended
    By RAS 2112 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-12-2013, 08:58 AM
  7. [SOLVED] macro not working as intended
    By Michael A in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-06-2005, 10:06 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