Forum Discussion
pborah
2 years agoSolution Sage
Please help with power query conditional column
I'm trying to group time data into day shift and night shift using custom column in power query I tried a few variations but can't seem to get it right. The conditional statement either ...
- 2 years ago
Hi pborah
Please refer to the solution of amitchandak in the linked discussion :
https://community.fabric.microsoft.com/t5/Desktop/M-Query-If-Statement-for-Dates-and-time/td-p/1786038If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
- 2 years ago
Hello pborah ,
try the following custom column
if DateTime.Time([received_time]) >= #time(6,0,0) and DateTime.Time([received_time]) < #time(18,0,0) then "Day" else "Night"
Ritaf1983
2 years agoSuper User
Hi pborah
Please refer to the solution of amitchandak in the linked discussion :
https://community.fabric.microsoft.com/t5/Desktop/M-Query-If-Statement-for-Dates-and-time/td-p/1786038
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.