Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi all,
I have to update values as a preswent in the tables here. i dont have idea how to complete it.
Table 1
| col1 | col2 |
| 1 | null |
| 2 | null |
| 3 | null |
| 4 | null |
Table 2
| Colour | Replacement |
| 1 | M |
| 2 | F |
| 3 | F |
| 4 | M |
And i want to have this values in my table 1
Table 1
| col1 | col2 |
| 1 | M |
| 2 | F |
| 3 | F |
| 4 | M |
Solved! Go to Solution.
@konwes97
You can either merge the table1 and table2 in power query or create a calculate Column = RELATED('Table (2)'[Replacement]).
Replace from another table is pretty complex in terms of logic, you may refer to:
Solved: Power Query - Replace values from another table wi... - Microsoft Power BI Community
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
@konwes97
You can either merge the table1 and table2 in power query or create a calculate Column = RELATED('Table (2)'[Replacement]).
Replace from another table is pretty complex in terms of logic, you may refer to:
Solved: Power Query - Replace values from another table wi... - Microsoft Power BI Community
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Hey @konwes97 ,
I think the easiest would be a new calculated column in Table 1 with the following formula:
Replacement =
-- Save the value of col1 in the variable vCol1CurrentRow
VAR vCol1CurrentRow = 'Table 1'[col1]
RETURN
-- Get the value from column 'Table 2'[Replacement] where
-- 'Table 2'[Colour] equals the value of current row
CALCULATE(
MAX( 'Table 2'[Replacement] ),
'Table 2'[Colour] = vCol1CurrentRow
)
hey
Thanks fot help, but the problem is that i need to replace the values, and not to add new.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 71 | |
| 38 | |
| 29 | |
| 26 |