Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Sort a line chart by the Y axis in Power BI

Hello,

 

I am trying to visualize some data on a graphic. I need to show some values according to the depth that is on the y-axis.

I have followed the instructions of the page below:

https://www.daytodatastuff.co.uk/blog/sort-a-line-chart-by-the-y-axis-in-power-bi

 

I sorted in power query the list according to depth and then added an index column and then tried to sort my values by Index. I still get the same error: We can’t sort the 'Verschiebung' column by 'Index'. There can't be more than one value in 'Index' for the same value in 'Verschiebung'.

 

I have to mention though that my 'Verschiebung' column was generated in DAX and not in the power Query, so when I want to transform the data in Power query, I do not see the column 'Verschiebung'.

But honestly, I do not think this should be a problem because, the calculated column 'Verschiebung' follows the rows of column 'depth' which is existing in power query.

 

Can you help me here?

 

Thank you for your time and consideration.

Best regards,

Maya Elias

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous 

    Please make sure the column in Axis doesn't have same value.

    My Sample:

    I add PSI in Axis in line chart. When I try to sort PSI by Index, it will show the same error.

    I try to remove same value in PSI.

    I can sort PSI column by Index.

    Best Regards,

    Rico Zhou

     

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

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    Please make sure the column in Axis doesn't have same value.

    My Sample:

    I add PSI in Axis in line chart. When I try to sort PSI by Index, it will show the same error.

    I try to remove same value in PSI.

    I can sort PSI column by Index.

    Best Regards,

    Rico Zhou

     

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello,

       

      Thank you for your reply.

      This is what I ended up doing but I was trying to find another way without the need of manipulating my data. Apparently it is the only way possible.

       

      Best regards,

      Yushi