Forum Discussion

MP_123's avatar
MP_123
Icon for Microsoft Employee rankMicrosoft Employee
10 years ago
Solved

date format in pbi

hi

im connecting direct query to ADW, in the database, i have a date field that for some reason, pbi convert it to date time. (for all dates show date + 12:00AM)

because im in direct, i cant transform the column but i can't tranform when connecting (sql query), im converting the colum and still, pbi add the time

is someone have an idea for me?

thanks a lot

  • The column has not changed data types,. It is just a format. You can change the format on measures and on individual visualisations. Sorry I don't have my direct query instance in front of me to be more specific. 

  • MP_123 Here is the snapshot of options I get in query editor using DirectQuery mode. Are you sure you don't get these options ?

     

     

     

     

     

     

     

     

     

     

9 Replies

  • MattAllington's avatar
    MattAllington
    Icon for Community Champion rankCommunity Champion

    I doubt PBI is converting it to date/time. More likely the column is formatted as date/time (In the same way I can format an integer as a decimal, like 1.00 and 2.00).  

    In Power BI, just change the number format to Date, and all should be fine. 

    • MP_123's avatar
      MP_123
      Icon for Microsoft Employee rankMicrosoft Employee

      MattAllingtonankitpatira

       

      i know that i can transform a column.. but it disabled in direct query. "The step result in a query that is not supported on a DirectQuery mode" .

      and i really checked it a few times, in the DB the data shown in date, and pbi adds the 12:00 AM to all of the data...

       

      thanks again.. hope you'll have an idea

      • MattAllington's avatar
        MattAllington
        Icon for Community Champion rankCommunity Champion

        The column has not changed data types,. It is just a format. You can change the format on measures and on individual visualisations. Sorry I don't have my direct query instance in front of me to be more specific. 

  • MP_123

    Matt is right. It is just format. In field list on right side pick date column that displays as datetime and, on ribon go to modeling tab and pick correct format in format drop down

    Jiri

     

  • ankitpatira's avatar
    ankitpatira
    Icon for Community Champion rankCommunity Champion

    MP_123 Can you not click on Edit Queries, go to Query Editor, under Transform tab, change Data Type to Date.