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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jmontes1810
Frequent Visitor

How can I get a column evaluating two other date columns?

Hi community,
This time I need your help to create a column that helps to evaluate two factors, let me explain:

First, I need to detect whe a date is in more than one row in the column "Internal Due Date".
Like the case of Enrique & Aaron, or the case of Valerie, Javier & Khalef (blue and grey fileds)

Then, among these who have the same date in "Internal Due Date", evaluate who has the oldest date in "Date Requested" and put a text/identifier to the rest ones. In this case, "Push" in the column "Desired Column".

"Desired Column" is the one I want to get.

Hope you can help me soon, thnks in advance community.

 

jmontes1810_2-1637264311389.png

 

CustomerInternal Due DateDate RequestedDesired Column
Julia10/21/202110/20/2021 
Martin10/29/202110/27/2021 
Enrique11/10/202110/28/2021Push
Melissa11/2/202111/1/2021 
Gerard11/8/202111/4/2021 
Farid11/9/202111/4/2021 
Aaron11/10/202111/10/2021 
Samantha11/11/202111/8/2021 
Dan11/12/202111/8/2021 
Valerie11/18/202111/11/2021 
Javier11/18/202111/17/2021Push
Khalef11/18/202111/17/2021Push
1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @jmontes1810 ,

It seems that the date "11/11/2021" is earlier than "11/17/2021". Please check.

Please have a try.

Create a measure.

Measure = var repeat_date=COUNTROWS(FILTER(ALL('Table'),'Table'[Internal Due Date]=SELECTEDVALUE('Table'[Internal Due Date])))
var grou= CALCULATE(MIN('Table'[Date Requested]),FILTER(ALL('Table'),'Table'[Internal Due Date]=SELECTEDVALUE('Table'[Internal Due Date])))
var aa= IF(repeat_date>=2&&grou=SELECTEDVALUE('Table'[Date Requested]),"Push",BLANK())
return aa

11.PNG

Best Regards

Community Support Team _ Polly

 

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

1 REPLY 1
v-rongtiep-msft
Community Support
Community Support

Hi @jmontes1810 ,

It seems that the date "11/11/2021" is earlier than "11/17/2021". Please check.

Please have a try.

Create a measure.

Measure = var repeat_date=COUNTROWS(FILTER(ALL('Table'),'Table'[Internal Due Date]=SELECTEDVALUE('Table'[Internal Due Date])))
var grou= CALCULATE(MIN('Table'[Date Requested]),FILTER(ALL('Table'),'Table'[Internal Due Date]=SELECTEDVALUE('Table'[Internal Due Date])))
var aa= IF(repeat_date>=2&&grou=SELECTEDVALUE('Table'[Date Requested]),"Push",BLANK())
return aa

11.PNG

Best Regards

Community Support Team _ Polly

 

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

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.