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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rahul_ferns
Helper II
Helper 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 HrsIncluded OTExtra OT
000
0.40.40
0.650.40.25
1.650.41.25
0.90.40.5
000
0.320.320
2.40.42
1.730.41.33
2.150.41.75
30.42.6
2.420.42.02
2.030.41.63
000
2.90.42.5
000

 

Regards

Rah

1 ACCEPTED SOLUTION
mussaenda
Super User
Super User

Power Query

mussaenda_0-1707377299948.png

 

 

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]

 

 

View solution in original post

2 REPLIES 2
mussaenda
Super User
Super User

Power Query

mussaenda_0-1707377299948.png

 

 

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]

 

 

Hi Mussaenda

Thanks, that worked

Much appreciated

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors