Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Rachelbramos
New Member

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.  

Rachelbramos_0-1615221516961.png

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

Rachelbramos_1-1615221720062.png

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

Rachelbramos_2-1615221755777.png

 

Can someone please help?  

 

1 ACCEPTED SOLUTION
lit2018pbi
Resolver II
Resolver II

@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:

lit2018pbi_0-1615225253515.png

Join this ID field with Period column from your table.

 

Now, use ID field in the axis and

 

lit2018pbi_1-1615225354410.png

 

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.

View solution in original post

9 REPLIES 9
lit2018pbi
Resolver II
Resolver II

@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:

lit2018pbi_0-1615225253515.png

Join this ID field with Period column from your table.

 

Now, use ID field in the axis and

 

lit2018pbi_1-1615225354410.png

 

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.

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!

@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.

lit2018pbi_0-1615228766336.png

 

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

 

Kudos 🙂

 

Pragati11
Super User
Super User

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

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi Pragati,

 

Yes I did but it does this:

Rachelbramos_0-1615223320570.png

 

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.  

Hi @Rachelbramos ,

 

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

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Do you mean the column in the data?  If so, it's not summarized (see below).  Is there another place to check or change this?

Rachelbramos_0-1615224162874.png

 

Hi @Rachelbramos ,

 

Click on your line chart --> On the right under Visualisation Tab you will see Period column is moved to x-axis area. Check there and see if it is summarised or not. It should not be summarised.

Also under format options, try making your x-axis as Categorical and see if this fixes the issue.

Pragati11_0-1615224535069.png

 

Also I tried a similar scenario at my end and it works for me. See my Index column is sorted in ascending order:

Pragati11_1-1615224836716.png

 

If you still have issues try sharing your pbix file by removing any sensitive information.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

It actually doesn't even let me choose "continuous".  If I try to click it, it defaults it back to "categorical".  So I guess that's not the issue.  It's for sure not summarized.  Let me see if I can make a shareable version of the data so I'm not accidentally sharing company secrets 😉

Stay tuned... 

 

Thanks again!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors