Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
Hi,
I need a custom column .
I have 2 different status from 2 diferent column.
Active_Status and Inactive_Status.
I need to create a custom column.
When Active_Status = "Active" and Inactive_Status = "Unavaliable" or Inactive_Status ="","Active" , Inactive_status = "Unavaliable" and Active_Status= "Active" or Active_Status ="", "Unavaliable".
Please help me.
Solved! Go to Solution.
Hi @Anonymous ,
Please refer to the code(Edit the code in "Advanced Editor".).
#"Added Conditional Column" =
Table.AddColumn(
#"Changed Type",
"Custom",
each if [Active_status] = "Active" and ([Inactive_Status] = "Unavaliable" or [Inactive_Status] = null) then "Active"
else if ([Active_status] = "Active" or [Active_status] = null) and [Inactive_Status] = "Unavaliable" then "Unavaliable"
else null
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please refer to the code(Edit the code in "Advanced Editor".).
#"Added Conditional Column" =
Table.AddColumn(
#"Changed Type",
"Custom",
each if [Active_status] = "Active" and ([Inactive_Status] = "Unavaliable" or [Inactive_Status] = null) then "Active"
else if ([Active_status] = "Active" or [Active_status] = null) and [Inactive_Status] = "Unavaliable" then "Unavaliable"
else null
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try in power query
if [Active_Status] = "Available" then [Active_Status] else if [Inactive_Status] ="Unavailable" then Inactive_Status else null
or
if [Active_Status] = "Available" then [Active_Status] else if [Inactive_Status] ="Unavailable" then Inactive_Status else ""
or
if [Active_Status] = "Available" then [Active_Status] else if [Inactive_Status] ="Unavailable" then Inactive_Status
@Anonymous or where alternate ways to create columns. Use only one. example
if [Active_Status] = "Available" then [Active_Status] else if [Inactive_Status] ="Unavailable" then Inactive_Status else null
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!