Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello I am currently trying to replace values in one column based on set criteria. I did some research and while I see a number of topics that talk about replacing a value in column A if value in column B equals criteria that is not excatly what I am looking for. Allow me to exaplian in further details:
I have a large table which constantly refreshes and pulls in new data. This table has data for differnet accounts that are named GenericCompanyX.
Account | Data 1 | Data 2 |
GenericCompany1 | 1121343 | sdfebgerffb |
GenericCompany1 | 434455 | dvgrnbrtgbgfdnr |
GenericCompany2 | 3452354 | fegfrgwef |
GenericCompany1 | 3546t44325 | wfrgregfegvr |
GenericCompany3 | 632432342 | gthwfgtnbhte |
I have another table which has the actiual names of the comapny listed in column Account.
Comapnies | Account |
ActualCompanyName1 | GenericCompany1 |
ActualCompanyName2 | GenericCompany2 |
ActualCompanyName3 | GenericCompany3 |
I want to replace the values in column Account in the 1st table with the values in column Comapnies in the 2nd table. So essentially:
If [Table1]Account == [Table2]Account
[Table1]Account == [Table2]Companies
Which would visually cause table to look like this:
Account | Data 1 | Data 2 |
ActualCompanyName1 | 1121343 | sdfebgerffb |
ActualCompanyName1 | 434455 | dvgrnbrtgbgfdnr |
ActualCompanyName2 | 3452354 | fegfrgwef |
ActualCompanyName1 | 3546t44325 | wfrgregfegvr |
ActualCompanyName3 | 632432342 | gthwfgtnbhte |
To be very clear I do not want to create another column in table 1 (i.e. conditional column) as that table has multiple sources and relationships that are already complaicated enough. I did notice that there is the "Replace Values" button but I am not sure if that is a one time action or will it keep replacing values as data is refreshed and pulled into PowerBi.
I will not be able to share the PBIX file or provide screenshots of the actual data for privacy reasons
Any help or direction would be greatly appreciated. If this is not possible please feel free to let me know. Thanks.
I have a problem similar to this...but the solution does not work for me. I have a column (Projected Date) with nulls for some dates. However, I do not want to replace all nulls in the column...only nulls for Plant "A", if Status is "D". The nulls can be replaced with dates from another table. I have attached the Power BI file...and below is a "mocked up" image of what I need.
I have tried If, and LookupValue...I am just not getting the syntax correct
I would like to include examples, but I cannot see where to add the .pbix file...and if I paste the visual example, I get an error for too many rows. Please email me so I can send you examples...Cheryl.Chapman@harley-davidson.com
Hi @vijenkin,
In the Power Query editor, try using merge Table1 and Table2 on Account so you get the column Companies, then Remove column Account, close and apply. This is the result:
This will be refreshed based on the schedule you define in the PBI Service.
Hope it helps.
Regards,
Fernando
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |