Forum Discussion
phoisan
6 years agoHelper I
Create 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.
vivran22
6 years agoCommunity Champion
Hello phoisan
You may try this:
Opt TimeInHours =
VAR _OptTCO = [Optimum TCO]
VAR _Table =
ADDCOLUMNS(TimeFrame,"TimeInHoursTest",TimeFrame[TimeInHours],"TCO",[TCO])
VAR _Filter =
CALCULATE(
VALUES(TimeFrame[TimeInHours]),
FILTER(_Table,[TCO] = _OptTCO)
)
RETURN
_Filter
Cheers!
Vivek
If it helps, please mark it as a solution
Kudos would be a cherry on the top 🙂
https://www.vivran.in/
Connect on LinkedIn