Michael D Losee
Michael D Losee

Reputation: 23

Power BI Visual throws an error when changing from hierarchy date to standard date

I have a date column in my data. When I drop the column into the visual it shows as a hierarchal date like normal (Separate columns for Year, Qtr, Month, Day). When I go to change it to a standard date format like (DD,MM,YYYY)in the visual, the visual throws an error.

"Column 'Date' in 'table' cannot be found or may not be used in this expression"

Any thoughts on how to fix this? I have never seen this before.

Upvotes: 1

Views: 125

Answers (2)

Ryan
Ryan

Reputation: 2482

In my opinion, the best way to deal with it is by using Power Query in Power BI and change it by using the option LOCALE. This will make all files have a standard format in the DATE column.

enter image description here

enter image description here

Upvotes: 0

Michael D Losee
Michael D Losee

Reputation: 23

The best way I found to do this is use the "FORMAT" function in DAX and make a custom date format in the function.

For Example (Create a New Calculated Column)

FORMAT('Date', "DD-MMM-YY")

I am not sure why Power Bi is behaving the way it is, throwing errors when trying to change between hierarchy and standard format, but this is a good workaround.

Upvotes: 0

Related Questions