Forum Discussion

Josh1994's avatar
Josh1994
Helper II
4 years ago
Solved

Add Column - Date Strange issue

Hello!

 

I am attempting to add column, Date, Month name.

 

I am able to add it as a number (i.e Jan is 1) but when i set it to name, It tells me the function isnt possible in direct query?

 

I do not understand why i am able to do one but not the other?

 

 

 

I have tried many work arounds, but i am confused as to what i am doing wrong!

 

Thank you all

  • There is a limited set of Power Query transforms that are allowed in Direct Query.  It looks like one of the date functions is allowed and one isn't.

    You can probably do it in DAX with a measure (or possibly a calculated column - you will have to try it). 

    Or add it in the source db.

    Or use Import model (or composite model) if there are lots of new columns required 

6 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion

    There is a limited set of Power Query transforms that are allowed in Direct Query.  It looks like one of the date functions is allowed and one isn't.

    You can probably do it in DAX with a measure (or possibly a calculated column - you will have to try it). 

    Or add it in the source db.

    Or use Import model (or composite model) if there are lots of new columns required 

    • Josh1994's avatar
      Josh1994
      Helper II

      HotChilli 

      Can any one reccomend the issue with my DAX?

       

      Apologies, i am a new user and have had no success with 2 hours of searching 😞

       

      I am unable to use power query as it is direct query

       

       

  • HotChilli's avatar
    HotChilli
    Community Champion

    Have you investigated using a composite model?  You could create a calendar table in powerbi and add all the relevant columns you need while maintaining direct query to the Fact tables.  You will need a relationship between the calendar and Fact tables 

    • Josh1994's avatar
      Josh1994
      Helper II

      Hi HotChilli !

       

      This is a new concept to me (composite models)

       

      Thank you for the reccomendation, I will revert to the search bar and see what i can achieve.

       

      Thanks again

       

      Josh