Forum Discussion

webportal's avatar
webportal
Icon for Impactful Individual rankImpactful Individual
10 years ago
Solved

Format date field in Power BI service

I have imported an Excel file to Power BI service from my OneDrive for Business.

The file contains a simple Excel table and one of the fields is a date.

Now, in Power BI service, I get that field displayed as a whole number which isn't very useful to read in a report.


How do I change the field to display as date?

 

Thanks!

  • webportal since in power bi service you don't get modelling part you can't explicitly mention data type for the column. so in that case couple of options as below,

     

    1. can you use power bi desktop to connect to file and export ? if yes then in that force data type conversion to date for that column

    2. play with formatting options in Excel itself and try different format options and see if it then picks up that column as of type date in power bi service.

2 Replies

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

    webportal since in power bi service you don't get modelling part you can't explicitly mention data type for the column. so in that case couple of options as below,

     

    1. can you use power bi desktop to connect to file and export ? if yes then in that force data type conversion to date for that column

    2. play with formatting options in Excel itself and try different format options and see if it then picks up that column as of type date in power bi service.

    • webportal's avatar
      webportal
      Icon for Impactful Individual rankImpactful Individual

      Hello,

       

      Thanks for your help.

       

      I found out if I change the data type in Excel to date, the field will also be displayed as date in Power BI service.