The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Solved! Go to Solution.
Hi, @sreddy47652 ;
Or in desktop create a column by dax.
Column = SWITCH([status],"Valid","Yes","Not applicable","Not applicable","No")
the final show:
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.
Hi, @sreddy47652 ;
Or in desktop create a column by dax.
Column = SWITCH([status],"Valid","Yes","Not applicable","Not applicable","No")
the final show:
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.
Hi, @sreddy47652 ;
You could create a conditional column in power query.
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:
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.
User | Count |
---|---|
79 | |
73 | |
39 | |
30 | |
28 |
User | Count |
---|---|
108 | |
99 | |
55 | |
49 | |
46 |