Forum Discussion

csalinas23's avatar
csalinas23
Icon for Helper II rankHelper II
6 years ago
Solved

Add column to a table

Dear

How are you? Please help me with the following:

I need to add to the following table 1 a column which is the union between the letter "S" and Column C as seen below:

Table 1
ABC
1611
2712
3813
4914
51015

Table 2

ABCD
1611S11
2712S12
3813S13
4914S14
51015S15

Stay tuned

Best regards

  • parry2k's avatar
    parry2k
    6 years ago

    csalinas23 you can add either using DAX or Power Query, screenshots you sharing are Power Query, add a custom column and use following expression:

     

    "S" & [C]

     

    and with DAX, to add a calculated column, use following

     

    D = "S" & Table[C]

     

    if you don't know anything about the custom column in Power Query or calculated column in DAX, you need to spend some time to learns basics of Power BI.

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

     

6 Replies

  • csalinas23 not sure you question, but you can add a calculated column like this

     

    D =  "S" & Table[C]

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

      • parry2k's avatar
        parry2k
        Icon for Super User rankSuper User

        csalinas23 you can add either using DAX or Power Query, screenshots you sharing are Power Query, add a custom column and use following expression:

         

        "S" & [C]

         

        and with DAX, to add a calculated column, use following

         

        D = "S" & Table[C]

         

        if you don't know anything about the custom column in Power Query or calculated column in DAX, you need to spend some time to learns basics of Power BI.

         

        I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

        Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

         

    • parry2k's avatar
      parry2k
      Icon for Super User rankSuper User

      amitchandak not sure how your solution is different than mine. You don't' have to reply or obligated to eply to everything if you don't have a different solution, just a suggestion.