The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
The expected output is the estimated completion date of the work, based on the last base date declared for each contract.
[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
)
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
Proud to be a Super User!
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
Proud to be a Super User!
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |