Forum Discussion
phoisan
Helper I
6 years agoCreate a measure which will return a specific column value based on other measure Power BI Desktop
Hi! I wanted to create a measure which will return a specific column value based on other measure TimeInHours is a column TCO is a measure I manage to find the min TCO value = 291.04. I wa...
- 6 years ago
Hi phoisan ,
You may create measure like DAX below.
Measure 1 = var _Table=SUMMARIZE(TimeFrame, TimeFrame[TimeInHours], "tcd" , [TCO]) Var MinTcd=MINX(_Table, [tcd]) return CALCULATE(FIRSTNONBLANK(TimeFrame[TimeInHours], 1),FILTER(_Table, [tcd]=MinTcd))Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
6 years agoHi,
This measure works
CALCULATE(CONCATENATEX(VALUES(TimeFrame[TimeInHours]),TimeFrame[TimeInHours],","),FILTER(VALUES(TimeFrame[TimeInHours]),[TCO]=VAR __Table =
SUMMARIZE(
TimeFrame,
TimeFrame[TimeInHours],
"ABC",TimeFrame[TimeInHours],
"TCO",[TCO]
)
VAR _MinTCO = MINX(__Table,[TCO])
Return
_MinTCO ))
Hope this helps.