Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Custom shorting

Hello,

 

I was wonering how to use customize short for below graph in powerBi -

 

I want in below order -

hire     24

onboarding  11

change job 17

termination 25

 

Can anyone help me with this?

 

 

  • Hi Anonymous ,

     

    You need to create a new sort table by your customize sort:

     

    Create a one to many relationship between sort table and fact table or you can use the following measure:

     

     

    measure = Calculate([Your original measure], treatas(values(sort[status]),table[status]))

     

     

    Then use the new column in the sort table as x-axis and  the measure for the values.

     

    Please refer to the pbix file. and you can also refer to https://radacad.com/sort-a-column-with-a-custom-order-in-power-bi

     

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

     

    Best Regards,

    Dedmon Dai

     

     

     

4 Replies

  • Hi, Anonymous 

    I suggest having one more column that shows the index number for hire - 1  /   onboarding - 2  /  Change job - 3  /  termination - 4 . Then you can sort by index number.

     

    Thanks.

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM

      • Jihwan_Kim's avatar
        Jihwan_Kim
        Super User

        Hi, Anonymous 

        Thank you for your feedback.

        I am not sure whether my sample suits your case or not.

        Please check the below picture and the very short video (Link down below).

        The column has to be together with the index column.

         

         

        https://www.dropbox.com/s/9lh5nbfdo1jwm51/Presentation3.mp4?dl=0 

         

        Hi, My name is Jihwan Kim.

         

        If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

         

        Linkedin: linkedin.com/in/jihwankim1975/

        Twitter: twitter.com/Jihwan_JHKIM

  • v-deddai1-msft's avatar
    v-deddai1-msft
    Community Support

    Hi Anonymous ,

     

    You need to create a new sort table by your customize sort:

     

    Create a one to many relationship between sort table and fact table or you can use the following measure:

     

     

    measure = Calculate([Your original measure], treatas(values(sort[status]),table[status]))

     

     

    Then use the new column in the sort table as x-axis and  the measure for the values.

     

    Please refer to the pbix file. and you can also refer to https://radacad.com/sort-a-column-with-a-custom-order-in-power-bi

     

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

     

    Best Regards,

    Dedmon Dai