Forum Discussion

DouglasWatkins's avatar
DouglasWatkins
Frequent Visitor
3 years ago
Solved

How to sort figures in a matrix.

I need to have a matrix show the latest/matching figures by month for a graph above it.  The normal sorting methods don't seem to work for me.

Thank you in advance.

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  DouglasWatkins ,

    I created some data:

    Is the column you want to sort in the matrix a text type, according to the Power BI design, if the column is a text type, it will be sorted alphabetically

    If you want to sort based on numeric priority, you can do the conversion

     

    Here are the steps you can follow:

    1. Create calculated column.

    Group1_number =
    var _len=LEN('Table'[Group1])
    var _len1=FIND("%",'Table'[Group1])
    return
    VALUE(
    LEFT(
        'Table'[Group1],_len-1)) / 100
    Select [Group1_number] – Column tools -- % -- set 0

    In Visual, press the following placement:

    2. Result:

     

    Best Regards,

    Liu Yang

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

2 Replies

  • Sorry, I don't see the attachment button.  Otherwise I would attach my file.

    Going to the dataview and sorting a column by an index column I have doesn't seem to work.  I was wondering if I could add a reverse index column.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  DouglasWatkins ,

    I created some data:

    Is the column you want to sort in the matrix a text type, according to the Power BI design, if the column is a text type, it will be sorted alphabetically

    If you want to sort based on numeric priority, you can do the conversion

     

    Here are the steps you can follow:

    1. Create calculated column.

    Group1_number =
    var _len=LEN('Table'[Group1])
    var _len1=FIND("%",'Table'[Group1])
    return
    VALUE(
    LEFT(
        'Table'[Group1],_len-1)) / 100
    Select [Group1_number] – Column tools -- % -- set 0

    In Visual, press the following placement:

    2. Result:

     

    Best Regards,

    Liu Yang

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