Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi there, Sorry this seems to be pretty easy but for some reason it doesn't work for me. I have query 1 with 2 columns which are region name and region code, and I have second query only with region code column. I'm trying to replace the region codes in second query with corresponding region names from the first query. The following is my code. It doesn't through any errors but it does nothing, so I'm not sure what am i doing wrong. Thanks! Custom1 = Table.ReplaceValue(#"Removed Other Columns",each TestQuery1[Region],each TestQuery1[Region Name],Replacer.ReplaceValue,{"Region"})
Thanks @camargos88 for your response. Merging does work but I have pretty big tables and further actions makes it pretty time consuming and affects the performance badly, so I would prefer to not use merge function at this stage.
@camargos88 can I create relationship in power query or do i have to use power BI desktop for that?
@camargos88 is it possible to kind of link the 2 queries as below? Once again it doesn't though any errors but it doesn't work
let
Source = Web.Page(Web.Contents("SOME URL")),
Data0 = Source{0}[Data],
#"Changed Type" = Table.TransformColumnTypes(Data0,{{"Region Name", type text}, {"Region", type text}, {"Endpoint", type text}, {"Protocol", type text}}),
#"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"Region"}),
Source1 = TestQuery1,
#"Region Name" = Source1[Region Name],
#"Converted to Table" = Table.FromList(#"Region Name", Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Region" = Source1[Region Name],
#"Converted to Table1" = Table.FromList(#"Region", Splitter.SplitByNothing(), null, null, ExtraValues.Error),
Custom1 = Table.ReplaceValue(#"Removed Other Columns",each #"Region",each #"Region Name",Replacer.ReplaceValue,{"Region"})
in
Custom1
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 8 | |
| 8 | |
| 7 |