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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,213,535
Messages
6,114,194
Members
448,554
Latest member
Gleisner2

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