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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sreddy47652
Helper III
Helper III

Need help to build logic based on status

Hi Team, I have column like Political payment in my table and the values appearing as 4 status( Awaiting Upload, Expired, Not applicable, Valid) and need to combine in 3 values  and change the status as

(Awaiting upload/Expired =No, 

Not applicable= Not applicable

Valid= Yes) 

Need to write this logic on power bi level. 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @sreddy47652 ;

Or in desktop create a column by dax.

Column = SWITCH([status],"Valid","Yes","Not applicable","Not applicable","No")

the final show:

vyalanwumsft_0-1663739521228.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @sreddy47652 ;

Or in desktop create a column by dax.

Column = SWITCH([status],"Valid","Yes","Not applicable","Not applicable","No")

the final show:

vyalanwumsft_0-1663739521228.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-yalanwu-msft
Community Support
Community Support

Hi, @sreddy47652 ;

You could create a conditional column in power query.

vyalanwumsft_1-1663211370657.png

Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcixPzCzJzEtXCC3IyU9MUYrViVZScK0oyCxKhXD88ksUEgsKcjKTE5NyUsFCYYk5mUDJWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [status = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"status", type text}}),
    #"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Custom", each if [status] = "Awaiting Upload" then "No" else if [status] = "Valid" then "Yes" else if [status] = "Not applicable" then "Not applicable" else if [status] = " Expired" then "No" else null)
in
    #"Added Conditional Column"

The final show:

vyalanwumsft_2-1663211496589.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors