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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gcongrove
Frequent Visitor

I want to create a row with value of "Pass" or "Fail" depending on value of another column

I am a little new to PowerBI and very new to the DAX portion.    I have a column (named App Status) in powerBI that contains the status for various software versions. The value's of this column contain data such as "replace", "SCCM install corp version", "must re-install" or "SOE"

 

Capture.PNG

 

I want to evaluate ALL values in "App Status" column, and depending on those values create another value of either "pass" or "fail"

something like, If cell value of app status = "replace", or " manual re-install", or "sccm install corp approved version" then i would display pass.

If any of the values in "app status" contain "SOE" then i would display a value of fail.

 

I have no idea how to come up with this information. I would appreciate any help.

Thank you

1 ACCEPTED SOLUTION
jthomson
Solution Sage
Solution Sage

Easiest way would be to create a new group on that field and assign to pass/fail as appropriate?

View solution in original post

4 REPLIES 4
YJ
Resolver II
Resolver II

Hi, @gcongrove 

you can use the SWITCH function on a calculated column:

 

ToDISPLAY = SWITCH(Table1[STATUS],"A","Pass","B","Fail","C","Pass")

20191025_BI_gcon.JPG

jthomson
Solution Sage
Solution Sage

Easiest way would be to create a new group on that field and assign to pass/fail as appropriate?

yes that worked nicely! I was not familiar with the group option.

 

Follow up question. Now that I have the new group created, is there a way to hightlight the "failed" value.  So that it is easier to spot in a list of pass values?

@gcongrove 

Yes of course,

click on your table, go to format, conditional formating, select your required field ( display etc) select background or other form of formatting and set the condition.

 

If it helps, kindly cliose this off and set it as the solution. Kudos are nice too=)

 

regards

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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