Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

how to trim space in data model

Hi,

 

I used combinedvalues as shown. 

 

I want to trim the space in order to get numbers instead of text.

 

I couldn't do it in power query because the column is not showing. Is there other ways to combine the values not as text.

 

Thanks

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi djurecic ,Thanks for your quick reply, I will add more.

    Hi Anonymous ,

    You can use the following DAX expression to create a column.

    Column3 = IF(ISBLANK([Column2]),[Column1],[Column2])


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

3 Replies

  • Hi Anonymous ,

     The combinevalues function is expecting text fields. You can use the CONVERT function on numeric fields within the combinevalues function to change numeric fields into text fields. Like CONVERT(textfield, DOUBLE).

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,

     

    The convert function works. But my other issue now is how to merge the data into one column as shown in the table view  without using power query 

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi djurecic ,Thanks for your quick reply, I will add more.

      Hi Anonymous ,

      You can use the following DAX expression to create a column.

      Column3 = IF(ISBLANK([Column2]),[Column1],[Column2])


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