Forum Discussion

WyldKnyght's avatar
WyldKnyght
Frequent Visitor
3 years ago
Solved

How to append text to non-numerical values?

Hello,

 

I am new to Power BI, advanced user for Excel. 

 

I'm trying to update specific values in a column if the are alpha character. The coulmn is text, but has both numbers and letters.

 

I'd like to add /28 to any non numerical characters and leave the numeric characters as they are.

 

 

Should look like

115

116

117

A/28

B/28

C/28

 

Thanks in advance for any help.

Craig

  • In the Power Query M editor add a custom column:

    let x = try Text.InferNumberType([Number])
    in if x[HasError] 
    then Text.Combine({[Number],"/28"})
    else [Number]

     

2 Replies

  • bolfri's avatar
    bolfri
    Solution Sage

    In the Power Query M editor add a custom column:

    let x = try Text.InferNumberType([Number])
    in if x[HasError] 
    then Text.Combine({[Number],"/28"})
    else [Number]