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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Saravanan_ameer
Frequent Visitor

Applying 2 conditions to create the column

Hi All,

 

I have the data of the employees login, log out timing details, gender details.

 

I want to create the column as per the below conditions

 

If Emp Gender Is M and Log out time is before 3.30 pm then mark it as Early 

If Emp Gender Is F and Log out time is before 3.20 pm then mark it as Early 

OR ELSE Normal

 

i am able to apply any one if condition not able to apply 2 conditions.

2 ACCEPTED SOLUTIONS
shreyamukkawar
Resolver II
Resolver II

Hi @Saravanan_ameer ,

 

Please find the below solution.

Flag = IF(Sheet1[log out]<3.30 && Sheet1[Gender]="M","Early",IF(Sheet1[log out]<3.20 && Sheet1[Gender]="F","Early","Normal"))
 
shreyamukkawar_0-1669013174452.png

 

Best Regards,

Shreya Mukkawar

If this post helps, then please consider Accept it as the solution to help the other members  find it more quickly.

View solution in original post

Hi @Saravanan_ameer ,

 

1. Create a column time.

time = IF(Sheet1[Gender]="M",3.30-Sheet1[log out],IF(Sheet1[Gender]="F",3.20-Sheet1[log out])
2. Create a column flag 2
Flag 2 = IF(Sheet1[Flag]="Early",Sheet1[time])
 
shreyamukkawar_0-1669020188318.png

Best Regards,

Shreya Mukkawar

If this post helps, then please consider Accept it as the solution to help the other members  find it more quickly and Like the solution.

 

View solution in original post

3 REPLIES 3
shreyamukkawar
Resolver II
Resolver II

Hi @Saravanan_ameer ,

 

Please find the below solution.

Flag = IF(Sheet1[log out]<3.30 && Sheet1[Gender]="M","Early",IF(Sheet1[log out]<3.20 && Sheet1[Gender]="F","Early","Normal"))
 
shreyamukkawar_0-1669013174452.png

 

Best Regards,

Shreya Mukkawar

If this post helps, then please consider Accept it as the solution to help the other members  find it more quickly.

Thanks for reply i need one more column that late by hh:mm which is for the Female how many hours they logout before 3.20 and also for Male before 3:30 how many hours

 

ex: The female is logout by 3 pm so she departure early by 0:20 and if the male is logged out by 3 pm so the value should reflect as 0:30 (I need it both in single column)

 

plesase help

Hi @Saravanan_ameer ,

 

1. Create a column time.

time = IF(Sheet1[Gender]="M",3.30-Sheet1[log out],IF(Sheet1[Gender]="F",3.20-Sheet1[log out])
2. Create a column flag 2
Flag 2 = IF(Sheet1[Flag]="Early",Sheet1[time])
 
shreyamukkawar_0-1669020188318.png

Best Regards,

Shreya Mukkawar

If this post helps, then please consider Accept it as the solution to help the other members  find it more quickly and Like the solution.

 

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.