Forum Discussion
Column exchange with a calculated column?
- 11 months ago
Hi TA_ ,
What are the columns you are using for the merge? Looking at the DAX code you should do the merge on the Info Table and match the Map_WE_ME[OldKey] with the Info[ID_WE_ME] then expand the Map_WE_ME[NewKey] on the resulting column. After that Replace the null by the Info[ID_WE_ME]
How are you setting the merge on the tables? Is on the info table or on the Map table?Can you share that specific line of code please.
Hi TA_ ,
Thanks for reaching out to the Microsoft fabric community forum.
Since calculated columns don’t appear in Power Query, try using this approach to fix the key column upstream. You can do this by creating a new column in Power Query with the corrected key values instead of handling it in DAX, then removing the old column and renaming the new one to match the original column’s name. This way, all your existing DAX measures that reference the old key will continue working without any additional changes, since the column name is preserved.
If even this approach is not suitable, consider changing the values in the source database if possible.
I hope this information helps. Please do let us know if you have any further queries.
Thank you
- TA_11 months agoRegular Visitor
Hi,
in my case, the mentioned way of recreating a column in powerquery and then merging it with my other table should be the correct way. Unfortunately i do get null values, but I do believe that my data might be corrupted. Anyways, the steps serve my purpose and sooner or later will get me to the point where I need it to be.
Thanks for the advises!
- MFelix11 months agoSuper User
Hi TA_ ,
When you received null values it means that you do not have corresponding values on the merge tables on this case you must replace your nulls by the Info[ID_WE_ME] field that is the second part of the coalesce that you are doing in the DAX formula.
- TA_11 months agoRegular Visitor
Hi Felix,
unfortunately, the data of the Info table and my reference table do not match at all. I am not certain about the source of error, but since this dashboard was created by another person i might just rebuild the entire project and set everything up in a way i can locate potential errors without guessing what the thought process of my predecessor was.