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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ashmitp869
Helper V
Helper V

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

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

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
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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