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

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

Reply
ashmitp869
Post Partisan
Post Partisan

How to do put AND condition when creating Add Column in Power query ?

Hi All.

How to put and condition in Power query when add column.

 

I have to put the logic like  if

timesheet_date >= qualification_complete_date and timesheet_date <= qualification_expiry_date:

dict_temp["Qualified"] = "Qualified" 

 

I tried to use like below - but I need the two and third line with and operation .

ashmitp869_0-1715216208180.png

 

Need help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ashmitp869 you can add a custom column with below code

 

if Text.Contains([Comments], "L") then "Learner" else if [Timesheet Date] >= [Date End Check] and [Timesheet Date] <= [Date Expiry Final] then "Qualified" else "Not Qualified"

vjingzhanmsft_0-1715324489108.png

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @ashmitp869 you can add a custom column with below code

 

if Text.Contains([Comments], "L") then "Learner" else if [Timesheet Date] >= [Date End Check] and [Timesheet Date] <= [Date Expiry Final] then "Qualified" else "Not Qualified"

vjingzhanmsft_0-1715324489108.png

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

wdx223_Daniel
Super User
Super User

click "Add Clause"

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Kudoed Authors