Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to sort the x-axis in Line Chart

Hi All,

 

I am infant to Power BI, And loving the tool.

Below is the line chart created ,But my X-Axis is not in order.

Can any one please guide in me to on solving this

  • @sam_powerbi

    You must create an additional sort column with WholeNumber data type.

    It's best to create it in Power Query Editor.

    and then sort these values into fields using

    Create index for each item the way you want to sort

    VijayP_0-1602423411504.png

    Before making any changes (the way you deal with the problem)

    VijayP_1-1602423456191.png

    After the changes described in the image

    I selected the Sprint field in the fields and selected the ColumnTools Tab ->Sort by Column -> Index option

    VijayP_2-1602423642987.png

    Then the final result will be as follows:

    VijayP_3-1602423719700.png

    Follow all the steps to get the result. Plesae share your Kudoes and if you find this as a solution. Please mark this as a solution.

    you can watch my videos from www.youtube.com/perepavijay

  • @sam_powerbi

    Thanks for accepting my answer as solution. Request you to Share your Kudeos by clicking the Like 👍 Icon next to my Answer.

    It counts

7 Replies

  • VijayP's avatar
    VijayP
    Community Champion

    @sam_powerbi

    You must create an additional sort column with WholeNumber data type.

    It's best to create it in Power Query Editor.

    and then sort these values into fields using

    Create index for each item the way you want to sort

    VijayP_0-1602423411504.png

    Before making any changes (the way you deal with the problem)

    VijayP_1-1602423456191.png

    After the changes described in the image

    I selected the Sprint field in the fields and selected the ColumnTools Tab ->Sort by Column -> Index option

    VijayP_2-1602423642987.png

    Then the final result will be as follows:

    VijayP_3-1602423719700.png

    Follow all the steps to get the result. Plesae share your Kudoes and if you find this as a solution. Please mark this as a solution.

    you can watch my videos from www.youtube.com/perepavijay

    • VijayP's avatar
      VijayP
      Community Champion

      @sam_powerbi

      Thanks for accepting my answer as solution. Request you to Share your Kudeos by clicking the Like 👍 Icon next to my Answer.

      It counts

    • VijayP's avatar
      VijayP
      Community Champion

      Anonymous 

      Thanks for accepting my answer as solution. Please share Kudoes as well by clicking on like sign infront of the 👍Like Button

      Also you can watch my Videos at www.youtube.com/perepavijay

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      Hi, how are you. I ve tried your solution and sadly, doesnt work.

      I created a Table with PQ, then add a index column. Then order by column, i select Index.
      Both Columns are Text type.
      Then, from the visual, i wanna order by year and ascendant and it looks like this

      The follow table is the Año ordenado

      I hope have been clear.
      Greetings

  • Anonymous 

    I think there is a "-" in the 'sprint-77" and "sprint-80, you can either try the above solutions or remove the "-" in the rawdata.

     

  • Icey's avatar
    Icey
    Community Support

    Hi Anonymous ,

     

    Please let us know if the replies above are helpful.

     

    If they are, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

     

    If not, please give us more details.

     

     

    Best Regards,

    Icey