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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.