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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.