Reply
ashmitp869
Post Patron
Post Patron
Partially syndicated - Outbound

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
v-jingzhan-msft
Community Support
Community Support

Syndicated - Outbound

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
v-jingzhan-msft
Community Support
Community Support

Syndicated - Outbound

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

Syndicated - Outbound

click "Add Clause"

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)