Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am curious if anyone knows how to solve this issue? Both columns are set to Text.
Solved! Go to Solution.
Judging by the error message, I would say the military time column is a number type, so you need to exclude the ".." from the comparison expressions:
ie IF('Transactions By Hour[Military Time] = 0, "12:00 AM", .....
Btw I suggest you use the SWITCH function for this:
Standard Time =
SWITCH(TRUE(),
Transactions By Hour[Military Time] =
0, "12:00 AM",
Transactions By Hour[Military Time] < 12, Transactions By Hour[Military Time] & ":00 AM",
Transactions By Hour[Military Time] =12, "12:00 PM",
Transactions By Hour[Military Time] > 12, Transactions By Hour[Military Time] -12 & ":00 PM")
Proud to be a Super User!
Paul on Linkedin.
Actually there is a much simpler way (now that I have access to a computer instead of my phone!).
Use the following code for the calculated column:
Standard Time =
FORMAT(TIME('Transactions By Hour'[Military Hour], 00, 00), "HH:MM AM/PM")
Proud to be a Super User!
Paul on Linkedin.
Judging by the error message, I would say the military time column is a number type, so you need to exclude the ".." from the comparison expressions:
ie IF('Transactions By Hour[Military Time] = 0, "12:00 AM", .....
Btw I suggest you use the SWITCH function for this:
Standard Time =
SWITCH(TRUE(),
Transactions By Hour[Military Time] =
0, "12:00 AM",
Transactions By Hour[Military Time] < 12, Transactions By Hour[Military Time] & ":00 AM",
Transactions By Hour[Military Time] =12, "12:00 PM",
Transactions By Hour[Military Time] > 12, Transactions By Hour[Military Time] -12 & ":00 PM")
Proud to be a Super User!
Paul on Linkedin.
Actually there is a much simpler way (now that I have access to a computer instead of my phone!).
Use the following code for the calculated column:
Standard Time =
FORMAT(TIME('Transactions By Hour'[Military Hour], 00, 00), "HH:MM AM/PM")
Proud to be a Super User!
Paul on Linkedin.