Thanks Thanks:  0
Likes Likes:  0
Page 3 of 3 FirstFirst 123
Results 21 to 23 of 23

Thread: Adding Power Pivot Data to the Data Model?

  1. #21
    Board Regular
    Join Date
    Jan 2012
    Posts
    825
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Adding Power Pivot Data to the Data Model?


    Adding Power Pivot Data to the Data Model?
    Quote Originally Posted by Maggie Barr View Post
    I am very happy to inform you that your comment of "load them as Power Query queries" made me go back to looking into this option. I had been able to create reference queries that would show me what I needed, but I was unable to link them through relationships back into the data model to allow for the display of the data from different queries within the same pivot. Well, I figured it out (mostly)! I have a locations table lookup that is unique at the Block Name/Code level, but my analyses actually look at the Region and Block Type, not the block name, so I created a reference query that grouped these so that I could then create the relationship needed, but I also had to create a merged columns of the region; block type so that I could base the relationship on that (one to many) but still allow the links to follow through. That being said, I was still having a hard time getting the two separate queries to put data in by reading the species list accordingly, but then I realized I needed a reference query to the full dataset that created a distinct species list that appears in the data, and then link that to those other two queries based on species, and use that distinct species list as the rows. Now I can create one pivot table that has the columns from what would have been two pivot tables.


    That is a common, and powerful, technique in Power Query. I didn't mention it but in my little tests that I did with your data that is exactly what I was doing. Take a table with say Species in, strip out all columns but the Species, remove duplicates, add an index column, voila we have a Species table that we can add to the datamodel. We can then replace any other tables that have Soecies in them with a SpeciesId by merging with the Species table, extract the id, anbd remove the old text column. Add more relational, usable.


    Quote Originally Posted by Maggie Barr View Post
    I think I am at the point that I may need to know more about writing measures, if that is the tool to use. I would like to get the percentage of blocks each species is observed in the pivot as a column.

    Whilst I would not siscourage you from learning DAX measures, you might not need a measure for that. Take a look at pivots, right-click an item in the pivot list Values pane, and then click the Value Field Settings. There you can see that you can pivot as a percentage of the row or column. More complex stuff does need DAX, and should you have the time, it will add power to your analysis toolbox.


    Quote Originally Posted by Maggie Barr View Post
    I created yet another reference query that parsed the data down and provides the # of blocks with data for each region; block type. I have the # of Blocks observed in for each species in each region; block type in one query, but I need a column (I think in that query) that will look for the # of blocks with data in another query that matches the region; block type field to do the percentage calculation. I hope this is making some sense, and if it does, I would appreciate any advice.

    Again, I don't understand why you would do this. If you have a table that contains all of the attributes of a block, the type, region, species, your pivot can give you the percentage directly. Am I missing something here?

  2. #22
    Board Regular
    Join Date
    Jan 2014
    Location
    Maine
    Posts
    155
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Adding Power Pivot Data to the Data Model?

    theBardd,
    So, I simply had to merge one query with the other to get the field into the query needed to calculate the percent. My problem now is that, when I try to pull that into the Pivot table, it wants to perform a calculation with that % thus changing it from 50% to 0.5. I do not know if a way to get a pivot to display just the contents of a field you drag in, and from what I have searched over the years and now, there is no way to do it. Any advice would be appreciated.
    Regards,
    Maggie

  3. #23
    Board Regular
    Join Date
    Jan 2014
    Location
    Maine
    Posts
    155
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Adding Power Pivot Data to the Data Model?

    Got it, Value field setting, show values as tab, no calculation, number format, % with 2 decimal places.
    I do not have the full report format yet, but the huge part of the report is now automatic.
    Always so grateful to everyone here at Mr. Excel for their time and effort to help!!!
    Best Wishes,
    Maggie

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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