Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi all,
I am trying to replace the value in [OriginalPathkey.4] with the number 805 if the value in [AssetType] is equal to CASHADJ but it is not working. I have tried changing the Replacer.ReplaceValue with Replacer.ReplaceText but with no success.
I have noticed that the data type of [OriginalPathkey.4] changes when applying this step, where the data type was whole number in the previous step. Thank you for your assistance.
Solved! Go to Solution.
It would be easier to make a custom column like:
Table.AddColumn(#"Changed Type1", "NewValue" each if [AssetType] = "CASHADJ" then 805 else [OriginalPathKey.4], Int64.Type)
--Nate
Here's one way to transform a column based on another column: (obviously using a made-up table)
Original
let
Source = Excel.CurrentWorkbook(){[Name="Table12"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"OriginalPathkey.4", Int64.Type}, {"AssetType", type text}}),
xformPathKey= Table.FromRecords(
Table.TransformRows(#"Changed Type", (r) =>
Record.TransformFields(r,{"OriginalPathkey.4", each if r[AssetType]="CASHADJ" then 805 else _})))
in
xformPathKeyResult
Hi @wcoetsee
If problem is not solved, please share some sample data
Proud to be a Super User! | |
It would be easier to make a custom column like:
Table.AddColumn(#"Changed Type1", "NewValue" each if [AssetType] = "CASHADJ" then 805 else [OriginalPathKey.4], Int64.Type)
--Nate
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |