Forum Discussion

MIshMash100's avatar
MIshMash100
New Member
2 years ago
Solved

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

  • 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).

2 Replies

  • 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

  • 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).