I am getting an error when I try to build out a conditional column to provide a time based on day.
For example, if day of week equals 0 (Sunday) or 6 (Saturday) make time 8:00 PM, otherwise 2-5 make time 10:00 PM
the column returns the literal #time(22,0,0)
Driving me crazy, can you help figure out the issue?
Thanks
Robb
Hi Robb,
Please provide a sample Excel file showing what you're trying to do so we can reproduce the issue and better understand and help you.
Mynda
Hi Mynda
see Store Close error
if day = 0 then 8:00 PM
if day = 6 then 8:00 PM
all other days 2-5 then 10:00 PM
Not sure how conditional column should work in this case.
Thanks
Hi Robb,
Thanks for the file. Click on the last step in the query editor > go to the formula bar and remove the double quotes around the #time(... formulas, so that it looks like this:
= Table.AddColumn(#"Changed Type1", "store close", each if [In Day of Week] = 6 then #time(20, 0, 0) else if [In Day of Week] = 0 then #time(20, 0, 0) else #time(22, 0, 0))
Then change the data type to Time.
Mynda