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
Meraptan
Regular Visitor

Help with Custom Column Lookup

Hello - I'm trying to create a custom column to do a few things, but can't figure out a formula to accomplish it.  The data is from a Tasks table in Project Online, so the rows are 'Tasks'.  I'm trying to end up with a 'My Date' custom column that has values like this:

Task TypeParent IDTask IDStart DateMy Date
1ABCD5/1/2019 
2ABGH6/1/2019 
3IJAB7/1/20195/1/2019
2BBHH6/1/2019 
3KKBB4/1/20193/1/2019
1BBDD3/1/2019 

 

The Logic I'm trying to use is something like this:  My Date= For all rows that are Task Type = 3, return the Start Date of the Task Type = 1 row that has the same Parent ID as the Task ID of the Task Type = 3 row, otherwise Blank

These are actual parent/child relationships and I was looking for Path and Lookup functions that can match columns, etc., but no success.  As you can guess, all Task Type = 3 rows are the Parent tasks of the others. I need someone smarter than me to tackle it please.   I know - kind of weird, but it does have a purpose.   Thanks a million.

1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hi @Meraptan ,

I created a measure that you can have a try.

Measure1 = var d=CALCULATE(MAX('Table'[Task ID]),FILTER('Table','Table'[Task Type]=3))
return
IF(MAX('Table'[Task Type])=3,CALCULATE(MAX('Table'[Start Date]),FILTER(ALLSELECTED('Table'),'Table'[Task Type]=1&&'Table'[Parent ID]=d)),BLANK())

2.PNG

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
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-xuding-msft
Community Support
Community Support

Hi @Meraptan ,

I created a measure that you can have a try.

Measure1 = var d=CALCULATE(MAX('Table'[Task ID]),FILTER('Table','Table'[Task Type]=3))
return
IF(MAX('Table'[Task Type])=3,CALCULATE(MAX('Table'[Start Date]),FILTER(ALLSELECTED('Table'),'Table'[Task Type]=1&&'Table'[Parent ID]=d)),BLANK())

2.PNG

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
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.