Forum Discussion

Susan12344's avatar
Susan12344
Regular Visitor
3 years ago
Solved

Direct query, not able to make changes

Hi all, For PowerBI I use direct query to an SQL server because the data needs to be refreshed every few hours. The current reports are not very nice, for instance the columns that display week...
  • BA_Pete's avatar
    BA_Pete
    3 years ago

     

    You can  safely add a month number column to either your fact table or your calendar table (I'd recommend the calendar table) in Power Query using just Date.Month([Date]). This will fold to the server and is, therefore, fine for use in a Direct Query model.

    Once you have that column, you can select your month name column in the Modelling tab, and use the 'Sort by column' dropdown under Advanced settings to assign it to sort by Month number:

     

    Pete