Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Can I use a variable inside Table.ReplaceValue function ?
/#"Replaced Value32" = Table.ReplaceValue(#"Changed Type2","noFullApplicationNameTag",Text.From([meterCategory]),Replacer.ReplaceValue,{"custom_TagsFullApplicationName"})
note : i dont want to use if else query and create a new variable in the process
I need to check for a value in a field and replace the value using anothe field value in the same viariable itself.
Any idea how to do it ?
Solved! Go to Solution.
Hi @agkolkata ,
Please see code below where I added "each" to 2nd and 3rd arguments:
Table.ReplaceValue(
#"Changed Type2",
each "noFullApplicationNameTag",
each Text.From([meterCategory]),
Replacer.ReplaceValue,
{"custom_TagsFullApplicationName"}
)
Regards
KT
worked seamlessly 🙂 thanks mate
Hi @agkolkata ,
Please see code below where I added "each" to 2nd and 3rd arguments:
Table.ReplaceValue(
#"Changed Type2",
each "noFullApplicationNameTag",
each Text.From([meterCategory]),
Replacer.ReplaceValue,
{"custom_TagsFullApplicationName"}
)
Regards
KT
Addon question:
Can we use a combination of 2 variables and a fixed text as the replacement value in this ?
Hi @agkolkata ,
Yes, you can, but you in to add a conditional statement.
I have a video explain the Table.ReplaceValue function.
Regards
KT
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
6 | |
6 |