Forum Discussion

Rachelbramos's avatar
Rachelbramos
New Member
5 years ago
Solved

Line chart re-orders sales period

Hi all,

 

I'm sure this is a super quick fix but I'm new to Power BI so forgive the basic question!

 

I've made a line chart to show actual vs goal over time.  We have 13 periods and I've made all the periods a 'number' in the data table.  For whatever reason it's still re-ordering my data in this illogical way, which makes absolutely no sense in my brain.  

Here's a sample of the data I have in the background

And here is how the "Period" column is formatted:

 

Can someone please help?  

 

  • Rachelbramos 

    It should take in ryt order but there is an other way.

     

    Click on Enter data and create a new table with these values:

    Join this ID field with Period column from your table.

     

    Now, use ID field in the axis and

     

     

    If it is sorted then you are good to go, else click on the ID field and then Sort by ID.

    Let me know if this works.

9 Replies

  • Rachelbramos 

    It should take in ryt order but there is an other way.

     

    Click on Enter data and create a new table with these values:

    Join this ID field with Period column from your table.

     

    Now, use ID field in the axis and

     

     

    If it is sorted then you are good to go, else click on the ID field and then Sort by ID.

    Let me know if this works.

    • Rachelbramos's avatar
      Rachelbramos
      New Member

      Ok, I *think* I followed all your directions correctly and it worked!

       

      To clarify, I made the table as you suggested, and then I clicked "Manage Relationships" and made a relationship between the table and the Period column. 

      It reverted the Period column back to text, so I made it into a whole number. 

      Then I went back to the graph and changed it from Continuous to Categorical, and then that appeared to make the graph work!  I hope anyway lol

      I'm going to double check the data now to make sure it's lining up the right way but I think that did the trick.


      Thank you!

      • lit2018pbi's avatar
        lit2018pbi
        Icon for Resolver II rankResolver II

        Rachelbramos 

         

        I am glad it worked. Haha

        Make sure to match the values in ID and the Period column. If any new records added to period field in future then you should add the same records to your ID field of sort table.

         

        If this resolved your problem please give me kudos and accept my reply as a solution.

         

        Kudos 🙂

         

  • Hi Rachelbramos ,

     

    Did you try clicking on the 3 dots on the top right of your line chart and sort by ascending order on x-axis column which is Period column?

     

    Thanks,

    Pragati

    • Rachelbramos's avatar
      Rachelbramos
      New Member

      Hi Pragati,

       

      Yes I did but it does this:

       

      I thought it was treating the periods as text, so I changed it to a number thinking that was the issue, but it's still not working.  

      • Pragati11's avatar
        Pragati11
        Icon for Super User rankSuper User

        Hi Rachelbramos ,

         

        Can you check one thing on the your chart? Make sure the PERIOD column on x-axis is not summarised.

         

        Thanks,

        Pragati