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 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.
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]
- TA_11 months agoRegular Visitor
Hey MFelix
this is the target column of my Info table. Each key is a building. There are several cases where two keys are the same building. This happens because those unique keys changed. My goal is to replace the old ones.
This is my new table (Änderungen_G) containing the information about the changes of ME&WE.
I tried different ging options. In my first attempt I created a new column in Änderungen_G and called it ID_WE_ME with the old values for WE and ME. The next step was to merge queries (starting from my main table/Info) and selecting both ID_ME_WE columns. I chose Left Outer and no fuzzy matching. What I thought would happen is the option to expand my new merged column so i can see MEneu and WEneu, so i could create a new column ID_WE_ME with these and rename the outdated one. Sadly I received null values.
My second attempt was basicly the same merging but I chose both ME and WE from each table without creating a new column. Results were the same tho.
What I still do not understand isthe following; If I search for combination based on the Änderungen_G table within the Info table (in the table view of power BI or the excel table) I do get results. If I try the same thing within the power query editor I don´t get any results at all. I have no clue why, but this should be the reason I can not get any results of my merging, since there are no corresponding values.
- TA_11 months agoRegular Visitor
I did the same steps as mentioned before with a clean copy of the data and somehow everything went well. I merged the columns of my assisting table to receive the old keys and the same for the new keys. Then the queries are merged based on the old keys and the new created column has all the new keys when expanded. After renaming the columns the dashboard was updated and the new keys were apllied.
Thanks for the assistance!