I have a table in power query that is fed from some Excel files, with this data I make an inner join with other catalog tables that I have and do operations on calculated columns and then add to the power pivot data model to make some pivot tables, initially everything was working very well until I made adjustments to the power query table by removing or adding more columns as well as editing the inner join operations, now when I do an update with and I want to pass the power query table to data model power pivot it gives me an error that the table does not exist, Mention that if I do the update only power query table it works without problems, the problem is when the data is going to be passed to power pivot.
How can I correct this error?
Sorry for my English
Yes, often when changes are made to initial queries these issues happen. Normally, when Query Names and/or Field/Column Names are changed and these names are used in the Merge or calculation steps query will pop these errors.
So, review/compare all the changes that you made to steps after the merge.
If you don't find any errors, consider making a copy of the steps and rebuilt from the merge to ensure optimum performance.
Related
I made a relation 1 to many between to table but when I try to use it in a pivot table it fails. I get the usual yellow message saying it may lack a relation. When I let it try to detect one it fails to find anything possible and when I check the existing ones, mine is there and done properly.
Here is a mock-up of the situation :
These are the simple tables :
To send the values to the data model I make those tables go through Power Query because the real situation requires Power Query. No additional steps are added, it's just the "From table or range" source.
Then, in Power Pivot, I create the relation with the diagram view :
When I then create a pivot table, the relation has not impact :
I also tried to add a measure and use it at as the value but to no avail :
Price:=SUMX(Rqt_Ref;Rqt_Ref[C_B]*Rqt_Ref[C_C])
I did not create the pivot table with the original tables instead of the one that were send to the date model because I want this to work even if there are more than 1 048 576 rows.
I have no idea as for why it fails and I welcome any comment.
Edit : Since I don't want to do the job in Power Pivot with DAX (related) I did the merge with Power Query Merge queries :
I think you might be misunderstanding how PowerPivot works. Your model should be related on C_A and C_4 for a start.
When I add fields from the dimension (C_A) and then one from fact C_4, it will show a cross join of everything and appear not to be working. Excel does this until you place a value in the values well.
Once I drop a count in the well like follows, the relationship works fine.
Where you might be getting confused is if you drop a field from Rqt_Ref into the values well and then you will get this error again and a full cross join. The reason for this is that you are asking Power Pivot to go from dimension to fact (OK) but then from fact to dimension (not OK)
I'm using Excel 365 and pulling in a table via Power Query. In the underlying SQL, I use an ORDER BY clause to sort the data, which works correctly in the PowerQuery preview and in my SQL client. But I noticed the table that winds up getting loaded in Excel isn't sorted in the same order. I added a sort step to Power Query as the final step, and it still didn't work, even after I wrapped the step in Table.Buffer(). I have also tried it with and without the Preserve column order/sort checkbox checked.
It only honors the sort settings if I uncheck the box to load the query into the data model.
How can I make it follow the sort as specified and load into the data model?
I have a table that I fetch via a connect through Power Query, which has a list of names. I apply some steps including sorting the names column alphabetically and then loading it to a Table and the "Data Model". However the table that is loaded onto a worksheet contains the list of the names sorted in a completely different order, its like Excel is ignoring my sorting preference completely. I tried to sort the data in the "Data Model" resorting it in Power query even the table in the worksheet itself, but after I hit refresh it reverts to the wrong order.
Try Table.Buffer wrapped around the sort
= Table.Buffer(Table.Sort(Source,{{"date", Order.Ascending}}))
or, alternatively, add an index at start, and resort on index when done
I can confirm buffering doesn't work. Incredible bug.
I have created many power queries and power pivot tables in my Excel file. After some time, I think the data structure may have gotten corrupted, because this is happening:
In Data Model, I have this Community_Membership table that cannot be deleted. It is the only table that has this behavior (all other tables were deleted successfully)
After that, I went to Power Query to delete all existing queries AND CONNECTIONS, so that the list is empty like below.
But this table remains un-deletable there after I have deleted all queries from queries list.
Anybody know how to fix this?
I finally recreated the file as follows:
Make a new Excel file
Copy all of the sheets
Select all of the queries from the old file's query pane, hit copy
Go to the new file's queries pane, hit paste
Go into Query Editor and edit any names with conflicts or remove any redundant queries
The entire process takes about 10 minutes as I only had about 10 queries / sheets.
I suspect this happened because I created a query, added it to the data model then went back to Power Query and edit it (either its name or its content in some mysterious way). After that the link between PQ and PP is broken so that even after the original query is deleted, its clone in PP remains. Strange.
I encountered a similar situation after having renamed a query in Power Query : Power Pivot could see the new table under the new name, but the old table was still there in Power Pivot and could not be deleted.
Finally I came up with this solution :
Make sure there are no remaining relationships or measures in Power Pivot that refer to the table you want to delete.
Create a query in Power Query, having the same name as the table you want to delete. The content of the query does not matter. Make sure that the checkbox "load into the datamodel" is checked. As a result, the synchronization between Power Pivot and Power Query is restored.
Edit the query again and uncheck the checkbox. Now Power Pivot understands that we want to remove that table.
Now you can delete the query in Power Query.
In powerpivot, Related(Othertable[field]) retrieves the associated column from a related table.
I would like to import ALL such columns, doing the equivalent of a join.
Is it possible to do this ?
nicolas,
the smartest thing to do from my perspective is to merge your queries into one so that you can keep your original tables.
I would suggest using new PowerQuery Merge funcionality, which is very easy and works reliably (and also supports loading data directly into your PowerPivot data model).
Or you can write you custom Query in PowerPivot - if you use MSSQL (or any other) database as your source, you can actually use JOIN directly in the PowerPivot window with Table Import Wizard that makes things a bit easier.
So the answer is: keep your original data tables intact, and create a new one that will be merging them together just for the purpose of your desired report.
Hope this helps.