# Power BI Return Value Based on Another Column

0 like 0 dislike
99 views
in Power BI

In Power BI, I need to get value based on another column where I have a table with Insurance and I need to get the insurance name that has the minimum price.

Insurance Price
Insurance 1 300
Insurance 2 200
Insurance 3 100

How can I show the lowest value from the first column with the minimum value in the second column?

0 like 0 dislike
by 60 125 265

## 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