Error message while loading to Excel after date was removed in Group By operation.

JohanLingen

New member
Joined
Aug 28, 2019
Messages
2
Reaction score
0
Points
0
Excel Version(s)
Excel 2016
I've loaded order info with amongst many columns, production date and production volume. In order to get a nice graph in which I can monitor production orders during the lifecycle of the product, I us a calculated column to find out how many months ago the order was carried out. I made sure that I have at least one entry for each product/months_ago combination (because the resulting pivot table will use labels instead of true numbers on the x-axis).
However, I have a lot more lines per month that I want to get rid of.
So I use 'Group By' to leave out the unimportant variations (such as order number and order type) and only focus on part number, # months ago and production volume.

Here's the problem: If I leave the production date out (that is, not select it in the 'Group By' dialog) I get an error when I load it to an Excel table! If I leave it alone, I will have a lot of duplicate data (and volumes will also be multiplied!).

The error freely translates as:

"The query was not carried out or the data model could not be opened. The following error message was returned:
The query points to the calculated column 'worksheet_name'[Production date (Year)], but this doesn't contain data because the column expression results in an error."


The table in Excel automatically adds columns for Year, Quarter, Month, basing itself on the production date. It seems to me that this might somehow generate the issue, but I have no clue how to solve it.
In Powerquery I don't get an error.
Hope someone can point me in the right direction!
 
Can you post the workbook?
 
Solution found!

Bob, thank you SO much for your willingness and contribution to the solution (even while still unaware).

While creating a version with masked data, I encountered the error in another query as well. This made me suspect that the error is not something that should be solved in the query, but rather in the data model itself. This proved to be correct. Here's what I did to solve the issue (see also attachement with screenshots in dutch language):

1. Click 'Manage data model' on the Data menu.
2. Click the Diagram View
3. Find the Table that originally gave me the error. Here were four automatically created columns -derived from the production date- with yellow triangles. I selected those four columns, pressed DELETE and confirmed deletion.

Solution.png

Problem solved!
 
Back
Top