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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Solution Sage
Solution Sage

@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
Solution Sage
Solution Sage

@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
Responsive Resident
Responsive Resident

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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