Forum Discussion
Changing data structure of Excel after import
- 10 years ago
Hi Jossy, why trying to do it outside Power BI when you can do all that you mentioned within the desktop tool.
You can find more info here: https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-common-query-tasks/#shape-and-combine-data
It works pretty much like Excel, so you can add columns, change column names, add calculated fields, include expressions and much more!
Note that even if you change the column names or add columns with calculations etc, query will continue coming smoothly.
Hope it helps.
Hi Jossy, why trying to do it outside Power BI when you can do all that you mentioned within the desktop tool.
You can find more info here: https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-common-query-tasks/#shape-and-combine-data
It works pretty much like Excel, so you can add columns, change column names, add calculated fields, include expressions and much more!
Note that even if you change the column names or add columns with calculations etc, query will continue coming smoothly.
Hope it helps.
- Jossy10 years agoRegular Visitor
Thanks loads for your reply!
The data set I'm using isn't finalised yet - we're adding fields and data to enrich the data set as we go. Not ideal for created a stable reporting model but needs must! Found that PBI does remember all the field names that haven't changed so it's only a minor task to update the ones that have!
Jossy
- thegeo9 years agoFrequent Visitor
Sorry to necro post. I have an answer to this question.
I've been working exclusively with Excel data in Power BI, and this data has also been in flux. Fields have been removed, renamed, etc. At first, I was just getting frustrated when this happened and wiping out the data and re-importing. That didn't work very well because then I would lose all my transforms. (Unfortunately, Power BI isn't good at guessing the data types in my data.) Like you and probably a lot of people drifting in here from search engines, I knew there had to be a better way.
One day I got curious about the Advanced Editor and looked it up. This was a game changer. Now, when I get errors updating Excel data because a field has been taken out or renamed, I right click the query in the query editor and click Advanced Editor. It's so easy from there to delete fields, rename fields, or change field types.