Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
patrickoleary85
Frequent Visitor

Insert parameter from column A to column B

Hi there,

I have 2 columns in PowerQuery, text and CurrentValue. 

The value in 'text' contains {CurrentValue1}, which looks at the CurrentValue column. 

For the highlighted example with '40' in CurrentValue, the text needs to display "...for 40 has been submitted for review." 

You'll also see an example that has 'do' and 'P' in CurrentValue. 

How can I insert the text from the CurrentValue column into the {CurrentValue1} location in the text column?

Please note that the text column has a number of different variations ("{CurrentValue1} is missing a Training", "Course is missing for the user {CurrentValue1}.") so I cannot use a simple replace or split and then re-merge the columns since location is always different.

Thank you in advance!

patrickoleary85_0-1716998547124.png

 

1 ACCEPTED SOLUTION
CatSchneider
Regular Visitor

Add in a 'Replace Values' step from the Transform Tab, then update the step in the formula bar to:

= Table.ReplaceValue(
    #"Name of your last step",
    "{CurrentValue1}",
    each _[CurrentValue],
    Replacer.ReplaceText,
    {"text"}
)


And you end up with something like:

CatSchneider_1-1717034525662.png

 

Let me know if this helped!

View solution in original post

2 REPLIES 2
CatSchneider
Regular Visitor

Add in a 'Replace Values' step from the Transform Tab, then update the step in the formula bar to:

= Table.ReplaceValue(
    #"Name of your last step",
    "{CurrentValue1}",
    each _[CurrentValue],
    Replacer.ReplaceText,
    {"text"}
)


And you end up with something like:

CatSchneider_1-1717034525662.png

 

Let me know if this helped!

Thank you @CatSchneider ! This worked great. Apologies for the delayed response

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors