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

View all the Fabric Data Days sessions on demand. View schedule

Reply
jhonatanm90
New Member

help with returning information in dax

Hi, I'm having a hard time returning information based on 3 columns.

I have a column for contracts, one for each contract's base date and one with estimated constructions end date (it's calculated based on an internal estimate).
Here is an example in the table in image

https://imgur.com/a/bwN0Agm

 

The expected output is the estimated completion date of the work, based on the last base date declared for each contract.

3 REPLIES 3
daxer-almighty
Solution Sage
Solution Sage

[Base Date] =
IF( HASONEVALUE( T[Contract] ),
    MAX( T[Base Date] )
)

[Est. End Date] =
IF( HASONEVALUE( T[Contract] ),
    var BaseDate = [Base Date]
    var EstEndDate =
        CALCULATE(
            SELECTEDVALUE( T[Estimated End Date] ),
            KEEPFILTERS( T[Base Date] = BaseDate )
        )
    return
        EstEndDate
)
Nathaniel_C
Community Champion
Community Champion

Hi @jhonatanm90 try this:

Last Output Construction End Date = 
var _Contract = MAX(myTable[Contract])
Var _baseDate = MAX(myTable[Base Date])
var _endDate = MAX(myTable[Construction End Date])

var _calc = CALCULATE(MAX(myTable[Construction End Date]),FILTER(All(myTable),myTable[Contract]=_Contract ))
var _ifcalc = IF(_calc = _endDate,_calc)
return _ifcalc


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Capture226.PNG

 
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.