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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
jabbajuice08
Frequent Visitor

Return a value based on the latest date into my matrix

I need to grab the first ID # value in a drillthrough list (task with the latest finish date) and bring it into my matrix. I tried:

 

 

 

calc column = 
CALCULATE(
   FIRSTNONBLANK( Tbl1[ID#] ),1 ), 
   FILTER( ALL ( Tbl2, Tbl2[HO Link #] = Tbl1[ID#] ) 
)

 

 

 However, this is only bringing in the first value that is listed alphabetically. I need the first value that has the latest finish date of each group of tasks (this is based on drilling through each unique ID # to find the list of ID #'s associated with that parent ID).

1 REPLY 1
Anonymous
Not applicable

Hi @jabbajuice08 ,

 

Please try this code to create a calculated column.

calc column =
VAR _LASTFINISHDATE =
    CALCULATE ( MAX ( Tbl1[Finish Date] ), ALLEXCEPT ( Tbl1, Tbl1[ID#] ) )
RETURN
    CALCULATE (
        FIRSTNONBLANK ( Tbl1[ID#], 1 ),
        FILTER ( ALL ( Tbl2 ), Tbl2[HO Link #] = Tbl1[ID#] ),
        FILTER ( Tbl1, Tbl1[Finish Date] = _LASTFINISHDATE )
    )

If this reply still couldn't help you solve your issue, please share a sample file with me and show me a screenshot with the result you want. 

 

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors