user882670
user882670

Reputation:

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!

Upvotes: 1

Views: 1986

Answers (2)

KARTHIKEYAN.A
KARTHIKEYAN.A

Reputation: 20118

We can use FORMAT() method to format date value, Use below mentioned formula

Syntax: Column = FORMAT(Table[column],"MM/DD/YYYY")

Column = FORMAT(DailyActiveUsers[startDate],"MM/DD/YYYY")

Before my data:

enter image description here

After my data:

enter image description here

Upvotes: 0

Mike Honey
Mike Honey

Reputation: 15037

This usually works by default for true Excel dates. Anyway, just open the Edit Queries window and navigate to your table. In the column header for your Date, change the Data type to Date. Close & Apply to see the result in your report.

Upvotes: 0

Related Questions