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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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