March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi guys,
I have a problem that I cannot understand. I am working on the service with dataflows and I have a simple table that brings me sales forecast for a every month. So the normal table is like this:
material | location | material_desc | year_month | forecast |
abs123 | store_01 | iphone | 2024_01 | 10.000 |
dfg345 | store_01 | samsung | 2024_02 | 5000 |
Then I ask to pivot the year_month column to chage the table to this:
material | location | material_desc | 2024_01 | 2024_02 |
abs123 | store_01 | iphone | 10.000 | null |
dfg345 | store_01 | samsung | null | 5000 |
And it works fine. No errors.
But then I schedule the dataflow to be refreshed every day. Then I started to get the error Expression.Error: The column '2024_01' of the table wasn't found.
But the code on the power query does not make any mention to the column name, nevertheless I get the error.
Is there any workarounds?
Solved! Go to Solution.
If you have a Pro license you can open a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi
Otherwise you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues .
@lbendlin I don't understand the "manually". I have done it programmatically. I am using the pivot transformation function and considering the traditional function, when you pivot, there is a column that is the Attribute and anotther for the Values. I am just doing that. And the attributes that exists are variable. And the pivot function is failling.
I cannot think of any workaround, thus the cry for help.
If you have a Pro license you can open a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi
Otherwise you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues .
Find a process where you don't need to manually pivot rows into columns. For example in Power BI the visuals do that for you, for free.
@lbendlin thanks for your effort, but the cache problem do not solve my issue. Basically, with this error I cannot have a dataflow to prepare a set of data where I need to pivot rows into columns.
Then I ask to pivot the year_month column to change the table
Please explain your reasoning for doing this in Power Query. You should leave the pivoting to the Power BI visuals. You should avoid dynamic columns in Power Query output as much as possible.
Basically, I am using the Power Query on Excel. And the user wants to see the outcome values pivoted into columns.
This is a business necessity, I just need to find out why the pivot instruction sometimes presents errors, and sometimes not.
Technically, the columns of my final query are dynamic, because when pivotting the resulting column names can be different, but I do no execute any part of the power m language connected to the dynamic names.
That is part of the problem. The presented error would make sense, if I had any instruction (or code) that would refer the pivoted column by name. So in my opinion the error do not make any sense.
Power Query is caching meta data. You keep changing the meta data. Power query gets confused.
And is there a way of cleaning the cache?
Probably. No idea where this is for Excel though.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
37 | |
22 | |
20 | |
10 | |
9 |
User | Count |
---|---|
60 | |
56 | |
22 | |
14 | |
12 |