How to get value based on another column in Power BI?
To get the corresponding value based on another column like showing the lowest value from the first column with minimum value in the second column, you have to use the below DAX function
Lowest Price =
VAR MinPrice =
CALCULATE ( Min('Table Name'[Price Field Name] ), ALL ( 'Table Name' ) )
RETURN
CALCULATE ( Min('Table Name'[Field Value in First Column]), 'Table Name'[Price Field Name] = MinPrice )
Example
Lowest Degree =
VAR MinDegree =
CALCULATE ( Min('Employee Degree'[Degree] ), ALL ( 'Employee Degree' ) )
RETURN
CALCULATE ( Min('Employee Degree'[Employee]), 'Employee Degree'[Degree] = MinDegree )
Output
How to return value based on another column in Power BI?
Another alternative way to return value based on another column in Power BI is to use the below DAX formula:
Lowest Degree =
VAR MinDegree =
CALCULATE (
MIN('Employee Degree'[Degree])
)
RETURN
CALCULATE (
MIN ( 'Employee Degree'[Employee] ),
FILTER (
ALLEXCEPT ( 'Employee Degree' ,'Employee Degree'[Employee]),
'Employee Degree'[Degree] = MinDegree
)
)
Output
See Also