Adding Power Pivot Data to the Data Model?


Rules violation
Jan 21, 2012
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.

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.

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?

Maggie Barr

Board Regular
Jan 28, 2014
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.

Maggie Barr

Board Regular
Jan 28, 2014
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,

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...