Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Measure to concanate a column with string

Hello,

 

I have a column (with categories) 

Example

AAA
BBB
CCC
DDD
EEE

And i would like to create a measure that adds a string after each line. E.g. "in %", like a sufix

AAA in %
BBB in %
CCC in %
DDD in %
EEE in %

 

Is it possible? 

 

Thank you

9 Replies

  • bcdobbs's avatar
    bcdobbs
    Icon for Community Champion rankCommunity Champion

    Hi,

    I think you want a calculated column rather than a measure.

     

    Following DAX will do what you need:

     

    New Column = Table[Original Column] & " in %"

    • Anonymous's avatar
      Anonymous
      Not applicable

      I have a limited dataset, I canť see data or add any additional columns into tables. Only measures is possible to create. 

       

      So I´m curious if this works for any measures? 

  • smpa01's avatar
    smpa01
    Icon for Community Champion rankCommunity Champion

    Anonymous  the measure would be

    Measure = MAX(tbl[c1])&" in %"

    • Anonymous's avatar
      Anonymous
      Not applicable

      That would only add the string to the last line of the column not? 

      • smpa01's avatar
        smpa01
        Icon for Community Champion rankCommunity Champion

        Anonymous this will add that prrfix to each string

    • Anonymous's avatar
      Anonymous
      Not applicable

      I would like to put it to rows and next to each category (including " %") have a column with numbers.

      AAA in %25
      BBB in %2
      CCC in %54
      DDD in %56
      EEE in %6

      Something like this

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    It seems the connection mode you are using is live connection.  So until now, this is the only way you can  use  to add a string. 

    You add a text string. So the format cannot be converted to data .

    • Create a measure.

     

     

     

    Measure = "in %" &MAX('Table'[num])

     

     

     

     

     

    Best Regards

    Community Support Team _ Polly

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous ,

      I have modified my answer. Please check if your needs are met.

       

      Best Regards

      Community Support Team _ Polly

       

      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.