Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Issue with Table Not Sorting by Month/Day

I created a field in PowerBI called Month/Day. I extracted this from a Month/Day/Year column since I don't need the year due to a report level filter to only show the past 7 days.

 

I created a table, however, I cannot get it to sort in date order. Can anyone else?

  • Hello Anonymous 

    What you need is a numeric column to use as the sort order.

    MonthDaySort = MONTH ( uvw_RescoMobileAudit[Created On] ) * 100 + DAY ( uvw_RescoMobileAudit[Created On] )

    Then you set the sort on the Month/Day to use MonthDaySort.  In the image below I am setting the sort order on [Month Name] to use [Month Number].

1 Reply

  • Hello Anonymous 

    What you need is a numeric column to use as the sort order.

    MonthDaySort = MONTH ( uvw_RescoMobileAudit[Created On] ) * 100 + DAY ( uvw_RescoMobileAudit[Created On] )

    Then you set the sort on the Month/Day to use MonthDaySort.  In the image below I am setting the sort order on [Month Name] to use [Month Number].