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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sraj
Responsive Resident
Responsive Resident

Condition between two dates

Hi Everyone,

 

It would be a big help if someone could advise...looking for Employees who have several conditions and one of them is :

 

1. If 'Passed' from 1 week of enrolled date

 

sraj_0-1645730762146.png

 

 

I have created a new calculated column to give me the 7th day from the enrolled date which will show me if the user completed it before this date and want only those users who completed it between the 7th day of enrolled date.  

 

7th Day of Enrolled Date = [Merged] + 7

 

Now I need to know who are those users who did it...may be another column with Yes or No and filter only those which have 'Yes'?? OR is there anyway I can show which one of them is eligible (7th day of enrolled date is the due date and the complete date should be = or < the Enrolled date)

 

Can someone please advise on how I can achieve this?

 

Thank you!

 

1 ACCEPTED SOLUTION
TheoC
Super User
Super User

Hi @sraj 

 

You can use the below calculated column:

 

Column = 

VAR _1 = 'tSRAJ'[Pass / Fail] = "Passed"
VAR _2 = 'tSRAJ'[7th day Enrolled] <= 'tSRAJ'[Completed]H
VAR _3 = IF ( AND ( _1 , _2 ) = TRUE() , TRUE() , FALSE() )

RETURN

_3

Output is like below:

 

TheoC_0-1645759158488.png

 

I used "tSRAJ" as the table name.  Apologies!  Had did a few solutions in the one PBIX to test syntax! Apologies!

 

Hope this helps!

Theo 🙂

 

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

2 REPLIES 2
sraj
Responsive Resident
Responsive Resident

Great, that worked...Thank you!!

TheoC
Super User
Super User

Hi @sraj 

 

You can use the below calculated column:

 

Column = 

VAR _1 = 'tSRAJ'[Pass / Fail] = "Passed"
VAR _2 = 'tSRAJ'[7th day Enrolled] <= 'tSRAJ'[Completed]H
VAR _3 = IF ( AND ( _1 , _2 ) = TRUE() , TRUE() , FALSE() )

RETURN

_3

Output is like below:

 

TheoC_0-1645759158488.png

 

I used "tSRAJ" as the table name.  Apologies!  Had did a few solutions in the one PBIX to test syntax! Apologies!

 

Hope this helps!

Theo 🙂

 

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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