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
HenryJS
Post Prodigy
Post Prodigy

Add Measure Date Is Not In Future

Hi all,

 

How do I create a measure that states:

  • If CandidateRef does NOT HAVE a PlacementStartDate in the future THEN YES

 

 

 

Screen Grab.JPG

5 REPLIES 5
v-yiruan-msft
Community Support
Community Support

Hi @HenryJS ,

Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help anyone in the community find the solution easily when they face the same problem with you. Thank you.

However, if you still have something else needs help about this thread, please provide more details, we will continue to follow up.

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
az38
Community Champion
Community Champion

Hi @HenryJS 

try

Measure = 
var _isDateInFuture = CALCULATE( COUNTROWS('Table'), ALLEXCEPT('Table', 'Table'[CandidateRef]), 'Table'[PlacementStartDate] > TODAY())
RETURN
IF(_isDateInFuture < 1, "Yes", "No")

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hi @az38 

 

Doesn't seemed to have worked. Top two CandidateRef's have a PlacementStartDate's in the future.

 

It needs to be if the CandidateRef has a row where PlacementStartDate || ExtensionStartDate is in the future THEN YES for all rows with that CandidateRef

 

Hope that makes sense

 

 

Screen Grab2.JPG

Hi @HenryJS ,

What's your actual expected result? Which situation the field Finisher will display "Yes"? Situation 1 or situation 2?

1. When there is No PlacementStartDate in future for that CandidateRef?

2. When PlacementStartDate or PlacementEndDate have dates in future?

For example, the field Finisher will display yes or no for the CandidateRef 69785 ,105468 and 24768?

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
az38
Community Champion
Community Champion

@HenryJS 

you asked


@HenryJS wrote:

If CandidateRef does NOT HAVE a PlacementStartDate in the future THEN YES


So, if you want YES when CandidateRef has a future try

Measure = 
var _isDateInFuture = CALCULATE( COUNTROWS('Table'), ALLEXCEPT('Table', 'Table'[CandidateRef]), 'Table'[PlacementStartDate] > TODAY())
RETURN
IF(_isDateInFuture > 0, "Yes", "No")

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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.