Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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.
User | Count |
---|---|
88 | |
88 | |
75 | |
67 | |
58 |
User | Count |
---|---|
137 | |
110 | |
93 | |
84 | |
69 |