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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
EZimmet
Resolver I
Resolver I

Nested If

Trying to do a nested if have issue if someone can please assist - TY 

 

Capture.JPGAny of conditions to the left need to populate a 3rd column tagged to be reviewed

 

 

 

 

 

 

 

 

 

= Table.AddColumn(#"Expanded EZ Nodes", "Tab_Review_Live", each

 

if (OR
[DeviceStatus] = "Disposed", "Inventory", "Missing", "Return to Client"
and
[DisplayLabel] = "Live",
"Review Live",


if (OR [DeviceStatus] = "Active", "Inventory", "No Power"
and
[DisplayLabel] = "Disposed Devices",
"Review Disposed",


if ([DeviceStatus] = "Disposed"
and
[DisplayLabel] = "Old Devices",
"Review Old", null)))))

 

 

0d79b8e0-8a29-4ab5-b61a-7ec290f05674.jpg

 

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

The syntax is a bit off. Try adjusting it like this:

if List.Contains({"Disposed", "Inventory", "Missing", "Return to Client"}, [DeviceStatus]) and [DisplayLabel] = "Live"
then "Review Live"
else if List.Contains({"Active", "Inventory", "No Power"}, [DeviceStatus]) and [DisplayLabel] = "Disposed Devices"
then "Review Disposed"
else if [DeviceStatus] = "Disposed" and [DisplayLabel] = "Old Devices"
then "Review Old"
else null

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

The syntax is a bit off. Try adjusting it like this:

if List.Contains({"Disposed", "Inventory", "Missing", "Return to Client"}, [DeviceStatus]) and [DisplayLabel] = "Live"
then "Review Live"
else if List.Contains({"Active", "Inventory", "No Power"}, [DeviceStatus]) and [DisplayLabel] = "Disposed Devices"
then "Review Disposed"
else if [DeviceStatus] = "Disposed" and [DisplayLabel] = "Old Devices"
then "Review Old"
else null

Thank you Sir 

This worked all i needed to do is add last   ) 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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