Forum Discussion
Replace values in table with values from calculated table based on a condition
Hi Taras1!
I don
To replace the values in the "Visitors" column for stores 3 and 8 in your dataset with values from another table, you will probably have to use "Table.ReplaceValue" function in Power Query. This function allows you to replace specific values in a table with new values based on a matching condition.
To use the "Table.ReplaceValue" function, you can follow these steps:
In Power BI, open the dataset that contains the table you want to modify.
In the Power Query editor, select the table that you want to modify.
In the "Transform" tab, click the "Replace Values" button. This will open the "Replace Values" dialog box.
In the "Replace Values" dialog box, select the column that contains the values you want to replace in the "Column" field.
In the "Value to Find" field, enter the values that you want to replace. In your case, these would be the values in the "Visitors" column for stores 3 and 8.
In the "Replacement Value" field, enter the new values that you want to use to replace the old values. In your case, these would be the values from the other table that you want to use to replace the incorrect values in the "Visitors" column.
Click "OK" to apply the replacement.
After you have replaced the values in the "Visitors" column, you can use the modified table in your report just like any other table in the dataset. You can also use the Power Query editor to modify or remove the replacement if necessary.
Hope this helps you in some way...
- Anonymous3 years agoNot applicable
Hi Roberts,
thanks for answering, but at step 4 I got stucked - there is just no dialog window, just 2 fields like "Find - Replace with", that's it. Maybe I do something wrong?
And re step 6 - are you sure that it will work with calculated table? It's not even shown in Query Editor mode in the list of tables.
- RobertPaegelow3 years agoHelper I
Hi, i think you have to format the column as text first and then to number again.
- Anonymous3 years agoNot applicable
Unfortunatelly it doesn't make sence, you still have the same interface with no selecting options (