Forum Discussion
moshe_Arama2022
3 years agoFrequent Visitor
- Help - covert excel formula to power query - CONVERT TIME TO SHIFT NAME
Hi ! how can i make function like excel in the power query the excel function is : =IF(AND(U3>=TIME(6,0,0),U3<=TIME(15,0,0)),"Morning",IF(AND(U3>=TIME(15,1,0),U3<=TIME(23,0,0)),"Evening", "Night"...
- 3 years ago
You can copy the logic from my previous reply after the each-expression in the formula bar of that step
if [time_for_shift_segmentation] >= #time(6, 0, 0) and [time_for_shift_segmentation] < #time(15, 0, 0) then "Morning" else if [time_for_shift_segmentation] >= #time(15, 0, 0) and [time_for_shift_segmentation] < #time(23, 0, 0) then "Evening" else "Night"Make sure to keep the closing parenthesis of the Table.AddColumn function.
Ps. If this helps solve your query please mark this post as Solution, thanks!
moshe_Arama2022
3 years agoFrequent Visitor
hi thank you !
its helps me
bay the way i have tried to use in conditional column but i didnt get what i need
m_dekorte
Resident Rockstar
3 years agoYou can copy the logic from my previous reply after the each-expression in the formula bar of that step
if [time_for_shift_segmentation] >= #time(6, 0, 0) and [time_for_shift_segmentation] < #time(15, 0, 0) then "Morning" else if [time_for_shift_segmentation] >= #time(15, 0, 0) and [time_for_shift_segmentation] < #time(23, 0, 0) then "Evening" else "Night"
Make sure to keep the closing parenthesis of the Table.AddColumn function.
Ps. If this helps solve your query please mark this post as Solution, thanks!