Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Combine Similar Customer Name

Hello,

I am having trouble with formatting a dataset in Power BI. I have a unique customer ID for all my customers. However, the actual customer name per ID may differ. For example, customer ID 123 may have the following names: "ABC Company", "ABC Company, LLC", or "The Company, ABC." The actual customer name displayed doesn't matter to me, I just want a way to display one customer name per unique ID. Please let me know if you have any suggestions. Thanks!

  • Hi Anonymous ,

     

    You can create measure or column like DAX below.

     

    Measure: Concatenate1 = MAX('Table 1'[Customer ID])&"_"&MAX('Table 1'[Customer name])

     

    Column: Concatenate1 = CONCATENATE(CONCATENATE(Table1[Customer ID],"_"),Table1[Customer name])

     

    Best Regards,

    Amy

     

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

2 Replies

  • The use of add a conditional column would probably help you. Open query editor > Add Column > Conditional Column. Once you have your conditional  column setup use that in the visual.

  • v-xicai's avatar
    v-xicai
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    You can create measure or column like DAX below.

     

    Measure: Concatenate1 = MAX('Table 1'[Customer ID])&"_"&MAX('Table 1'[Customer name])

     

    Column: Concatenate1 = CONCATENATE(CONCATENATE(Table1[Customer ID],"_"),Table1[Customer name])

     

    Best Regards,

    Amy

     

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