Forum Discussion

Gnanasekar's avatar
Gnanasekar
Helper III
8 years ago
Solved

Number sorting in text format

Hi All,   A column in power bi report contained two datatypes data (Number & Text) Test: 1 , 22, 2,178, 3, Red, 10, 20, 30, Yellow, 100, 110,  200, 250,  Green   If I convert number (Decimal or...
  • MFelix's avatar
    8 years ago

    Hi Gnanasekar,

     

    Taking into account that you need the values by order you can always add a column with the following formula:

    Sort_Order =
    IF (
        NOT ( ISERROR ( 'Table'[Column] + 0 ) )
            = TRUE ();
        CONCATENATE ( REPT ( 0; 4 - LEN ( 'Table'[Column] ) ); 'Table'[Column] );
        'Table'[Column]
    )

    Then use this column to sort out the visual.

     

    Regards,

    MFelix