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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
MIshMash100
New Member

Date fields

Afternoon, complete beginner to Power Bii and im having problems when collating data using dates and wanting them displayed in date order , the data is all mixed up on the graph . any assistance is greatly appreciated

1 ACCEPTED SOLUTION
johnbasha33
Super User
Super User

@MIshMash100 

  1. Data Type: Ensure that the column containing dates in your dataset is formatted as a Date data type in Power BI. If it's not already, you can change the data type by selecting the column in the data model view and changing its data type to Date.

  2. Sort By Column: In your visualizations (such as line charts or bar charts) that use dates on the axis, you can specify a sort order for the date column.

    • Click on the visual to select it.
    • In the "Fields" pane, find the date column you're using for the axis.
    • Click on the three dots (...) next to the date column.
    • Choose "Sort by Column" and select the same date column from the dropdown list.
    • This will ensure that the dates are sorted in ascending or descending order based on the values in the same date column.
  3. Sort By Date Hierarchy: If your date column includes a hierarchy (e.g., Year, Quarter, Month), you can also sort the visual by the date hierarchy to ensure proper ordering.

    • Click on the visual to select it.
    • In the "Fields" pane, find the date column you're using for the axis.
    • Click on the three dots (...) next to the date column.
    • Choose "Sort by Date Hierarchy" and select the appropriate level of the hierarchy (e.g., Year, Quarter, Month).

View solution in original post

2 REPLIES 2
johnbasha33
Super User
Super User

@MIshMash100 

  1. Data Type: Ensure that the column containing dates in your dataset is formatted as a Date data type in Power BI. If it's not already, you can change the data type by selecting the column in the data model view and changing its data type to Date.

  2. Sort By Column: In your visualizations (such as line charts or bar charts) that use dates on the axis, you can specify a sort order for the date column.

    • Click on the visual to select it.
    • In the "Fields" pane, find the date column you're using for the axis.
    • Click on the three dots (...) next to the date column.
    • Choose "Sort by Column" and select the same date column from the dropdown list.
    • This will ensure that the dates are sorted in ascending or descending order based on the values in the same date column.
  3. Sort By Date Hierarchy: If your date column includes a hierarchy (e.g., Year, Quarter, Month), you can also sort the visual by the date hierarchy to ensure proper ordering.

    • Click on the visual to select it.
    • In the "Fields" pane, find the date column you're using for the axis.
    • Click on the three dots (...) next to the date column.
    • Choose "Sort by Date Hierarchy" and select the appropriate level of the hierarchy (e.g., Year, Quarter, Month).
Joe_Barry
Super User
Super User

Hi @MIshMash100 

 

Please check if the date column is formattted as date. You can do this in Power Query. When this is done it will sort correctly

Joe

 

If you found my answer helpful and it solved your issue, please accept as solution




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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