Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Babycakes
Helper II
Helper II

Custom column

Hi All 

 

I am attempting to get this custom column in Power Query however not quite correct

 

= Table.AddColumn(#"Changed Type1", "Rate", each if [Shift Start] < #time(18, 1, 0) then "Evening Rate"

 

 if [Shift end] > #time(18, 0, 0) then "Day Rate" else if [Shift End] < #time(18, 1, 0) then "Evening Rate"

If [Shift Start] < #time (05,59,0) then "Evening Rate" else ifIf [Shift Start] < #time (06,00,0) then "Day Rate"

and if [Shift Start] > #time (05,59,0) then "Evening Rate" else null)

 

else if [Shift Finish] > #time(18, 1, 0) then "Evening Rate" else null)

 

 

Shift StartSleepover StartSleepover FinishAllocated Shift Break (mins)Shift FinishWorked Hours in DayShift SplitsTotal shift hoursWeekDay
9:15 AM  01:15 PM4.00 41Thursday
9:15 AM  01:15 PM4.00 42Thursday
9:00 AM  01:00 PM4.00 41Tuesday
9:15 AM  01:15 PM4.00 41Wednesday
1 REPLY 1
lbendlin
Super User
Super User

Your sample data doesn't match your description.  Please check, and please also indicate the expected outcome based on the sample data.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.