Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
2 years ago
Solved

Delete Line feeds in a column's data

Dear friends, how are you?

My question is this: I want to append two tables that have the same structures, but one column, specifically the Metric column, has an annoying "character" that apparently are line feeds that I don't know how to modify.

For example: I have the metric column of the Bolivia table and I see the following:

Then the Chile column:

How could I homologate them so that they have the same detail in such a way that when it comes to making the FILTERS with DAX, I don't have that inconvenience that I have a Value (List USD) or Units for Chile and another for Bolivia?

Thank you very much in advance.

Best regards!

  • Anonymous's avatar
    Anonymous
    2 years ago

    Here is some DAX code to do it in a calculated column or you could do something similar in PowerQuery

     

    ColumnA = TRIM( SUBSTITUTE( RawColumn, UNICHAR(10), "" ) )

  • Excellent! Your answer helped me a lot

    Here's how I adapted your formula for my case:

    Z_Métrica_Final = TRIM(SUBSTITUTE(TOTAL[Metric], UNICHAR(10), "" ) )

    Best regards!

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Here is some DAX code to do it in a calculated column or you could do something similar in PowerQuery

     

    ColumnA = TRIM( SUBSTITUTE( RawColumn, UNICHAR(10), "" ) )

  • Excellent! Your answer helped me a lot

    Here's how I adapted your formula for my case:

    Z_Métrica_Final = TRIM(SUBSTITUTE(TOTAL[Metric], UNICHAR(10), "" ) )

    Best regards!

    • Anonymous's avatar
      Anonymous
      Not applicable

      Great!!! please mark my answer as a solution 🙂