Forum Discussion
rahul_ferns
2 years agoHelper II
Split Column Based On Criteria
Hello Experts
I need some advise and help with something I need
Got a column "OT Hrs" which I want to conditionally split into two columns based on the below criteria
If the value of the column is between 0 to 0.4, then that value goes into a column called Included OT
If the value of the column is >0.4, then 0 to 0.4 value goes to column called Included OT and the balance goes into another column called Extra OT
See below some data and results
| OT Hrs | Included OT | Extra OT |
| 0 | 0 | 0 |
| 0.4 | 0.4 | 0 |
| 0.65 | 0.4 | 0.25 |
| 1.65 | 0.4 | 1.25 |
| 0.9 | 0.4 | 0.5 |
| 0 | 0 | 0 |
| 0.32 | 0.32 | 0 |
| 2.4 | 0.4 | 2 |
| 1.73 | 0.4 | 1.33 |
| 2.15 | 0.4 | 1.75 |
| 3 | 0.4 | 2.6 |
| 2.42 | 0.4 | 2.02 |
| 2.03 | 0.4 | 1.63 |
| 0 | 0 | 0 |
| 2.9 | 0.4 | 2.5 |
| 0 | 0 | 0 |
Regards
Rah
Power Query
Included OT if [OT Hrs] >.4 then .4 else [OT Hrs]Excluded OT if [OT Hrs] = [Included OT] then 0 else [OT Hrs]-[Included OT]
2 Replies
- mussaendaCommunity Champion
Power Query
Included OT if [OT Hrs] >.4 then .4 else [OT Hrs]Excluded OT if [OT Hrs] = [Included OT] then 0 else [OT Hrs]-[Included OT]- rahul_fernsHelper II
Hi Mussaenda
Thanks, that worked
Much appreciated