Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
KiranR
Frequent Visitor

check if value exists in multiple columns

Hi Guys,

 

Need your help on powerbi desktop please. 

 

I am trying to workout a calculation to check mutiple column status for each row; if any of the column has 1 or more "Expired" status, in the result colum should reflect as "Expired" if not should reflect as "Valid". Please assist.

 

IDStatus1Status2Status3Status4Status5Result
Employee1ExpiredExpired1 MonthExpired2 Months 
Employee2Expired1 MonthExpired1 Month1 Month 
Employee31 Month1 Month1 Month1 MonthExpired 
Employee43 Months3 Months3 Months3 Months3 Months 
Employee51 MonthExpired1 MonthExpired1 Month 
Employee6Expired1 MonthExpired1 Month1 Month 
Employee73 Months1 Month1 Month1 Month1 Month 
Employee81 Month1 Month1 Month1 Month1 Month 
Employee9Expired1 Month1 Month1 Month1 Month 
Employee103 Months3 Months3 Months3 Months3 Months 
1 ACCEPTED SOLUTION
Thejeswar
Super User
Super User

Hi @KiranR ,

You can use the below DAX

Result = IF('Table'[Status1] = "Expired" || 'Table'[Status2] = "Expired" || 'Table'[Status3] = "Expired" || 'Table'[Status4] = "Expired" || 'Table'[Status5] = "Expired", "Expired", "Valid")

Output will be as shown below

Thejeswar_0-1674579010530.png

 

View solution in original post

1 REPLY 1
Thejeswar
Super User
Super User

Hi @KiranR ,

You can use the below DAX

Result = IF('Table'[Status1] = "Expired" || 'Table'[Status2] = "Expired" || 'Table'[Status3] = "Expired" || 'Table'[Status4] = "Expired" || 'Table'[Status5] = "Expired", "Expired", "Valid")

Output will be as shown below

Thejeswar_0-1674579010530.png

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.