Forum Discussion
Cannot apply changes, if column is removed and a measure is using it - this worked before
Before latest Desktop update (March), if a column was removed in source data and then from a table in data model, I could still apply the changes to a data model. If a measure was using the removed column, it showed an error.
After update, I cannot apply the changes anymore and then make corrections to measures afterwards - if column does not exist in the source data anymore, the only way to apply changes is to create this column as a dummy column. Then I can apply changes, make a change to measure to start using a new column and then remove the dummy column. This is much more work.
Problem:
- Existing column is removed and new column created to replace it in source data
- In Power BI, changes cannot be applied, because a measure is using the removed column. Error message is telling me that.
Worked before:
- Existing column is removed and new column created to replace it in source data
- I can apply changes to data model.
- I replace the removed column definition in a measure with a definition of a new column.
Workaround:
- Existing column is removed and new column created to replace it in source data
- I create removed column in Power BI as a "dummy column" including value 1
- I apply changes
- I replace the removed column definition in a measure with a definition of a new column.
- I remove the dummy column and apply changes.
Does anybody else have the same behaviour? Could this be anything else than a bug or a "feature" in new version?
4 Replies
- amitchandak
Super User
MiraNi , At high-level steps, seems fine.
1) Open Advance editor right click on table in power query , remove the column
2) Add a new column with same name
3) Save and close and apply changes.
This should work.
- MiraNi
Advocate IV
Thanks for a suggestion but it is just another workaround, which requires extra work. I am looking for the information, is this behaviour occurring to others also and is it really a bug or something else, I don't realize.
- v-henryk-mstf
Community Support
Hi MiraNi ,
In the previous version, the use of dummy column is a bug, and it does not conform to normal operation. In the latest version, it is normal that an error will be reported when the deleted column is used in the created measure. If you create a new column to replace it, you must first ensure that the type of the field is consistent, otherwise an error will be reported.
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- MiraNi
Advocate IV
Hi,
I am not quite sure, what you are saying. But I know, that this current Power BI Desktop version, it is not working fluently. If I have a deleted column deleted in data source, so it is not available anymore and instead, a new column has been created for this purpose, there is no easy way to make this column change in DAX measure definition, if I am not able to apply these changes first to data model. As I have been able to do before. The error has been reported also before, you could see the error icon for these measures, that have been using the deleted column and then it has been easy to go and change the definition to use new column.
Now, if I am missing any column used in DAX code, I cannot apply the changes to data model meaning not to add a new column either to be able to use that instead. So the only way I know, is to create a dummy column with the same name as the deleted column was named. Then I am able to apply changes, make a definition change and then remove the dummy column. Much extra work, which was not needed before.
The error message is saying, that the column named xxxxx has been used and cannot be found anymore.
Rgds, Mira