Order By in VS to send to Power BI

DeAnna Barker 1 Reputation point
2021-09-01T13:58:30.98+00:00

I have a date column in my table and then another column to extract the name of the month of the date column.
Example:
Date Month_Name
01/21/2021 January
03/05/2021 March
08/04/2021 August

I used the following script:

"Extracted Month Name" = Table.TransformColumns(#"Filtered Rows", {{"Month_Name", each Date.MonthName(_), type text}})

When I populate my Power BI dashboard and bring in the Month_Name column, it is not ordering by date, it's ordering alphabetically.
(August, January, March)
How can I use ORDER BY in VS? I cannot edit in PBI since I'm using SQL Server in VS.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,136 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Leon Laude 85,701 Reputation points
    2021-09-01T14:10:31.513+00:00

    Hi @DeAnna Barker ,

    They're also actively answering in the dedicated Power BI forum over here:
    https://community.powerbi.com/t5/Forums/ct-p/PBI_Comm_Forums

    ----------

    If the reply was helpful please don't forget to upvote and/or accept as answer, thank you!

    Best regards,
    Leon

    1 person found this answer helpful.
    0 comments No comments

  2. Darren Gosbell 2,376 Reputation points
    2021-09-01T22:42:31.167+00:00

    When I populate my Power BI dashboard and bring in the Month_Name column, it is not ordering by date, it's ordering alphabetically.
    (August, January, March)
    How can I use ORDER BY in VS? I cannot edit in PBI since I'm using SQL Server in VS.

    To fix this create a second column in your table with the month number (you can hide this column from the users if you like)

    The set the sort by property of your Month_Name column to use this new Month_Number column. Power BI and other client tools should then use this column to sort the Month_Name values.

    0 comments No comments