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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ashmitp869
Helper II
Helper II

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors