power Query - If and then else of - statement

joslaz

Board Regular
Joined
May 24, 2018
Messages
76
Hey guys!
I'm trying to map some logic using if then else.I have column "Date" and column "Duration".If the value for Duration is> 0.08: 00: 00 and it is between Mon-Fri, then 0.08: 00: 00 should be mapped.If the value is> 0.10: 00: 00 and it is between Sat-Sun then 0.10: 00: 00 should be displayed. Otherwise, the original value.
As I understand it, this would be:
if and then else if and then else

Date.DayOfWeek [Date] <= 4 and [Duration]> #duration (0, 08, 00, 00) then #duration (0, 08, 00, 00) else if Date.DayOfWeek [Date]> 4 and [ Duration]> #duration (0, 10, 00, 00) then #duration (0, 10, 00, 00)


Do you have any suggestions?


Best regards
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,215,011
Messages
6,122,680
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top