The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a column called DEASCH that has a few distinct entries that I need to change. I need to use some sort of "IF C48676 then 3" statement to change all of the following entries. The blanks, empty entries, and the C38046 don't need to be changed to anything.
Do I need to use a measure to do change these rows?
Or should I add a new column to do this? If so, then how would I do it?
Solved! Go to Solution.
Hi @Anonymous ,
You can add a custom column in Power Query Editor with the below applied codes, please find the attachment for the details.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcgzydVbSUTKwNACSSrE6aCIKmELOxhYGJmaHFmCRMbEwMzfFIW6GQ9wch7glLpspt5d4GynRO3DhNNAisQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [FACILITY = _t, #"FACILITY ID" = _t, DEASCH = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"FACILITY", type text}, {"FACILITY ID", type text}, {"DEASCH", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if Text.Trim([DEASCH])<>"" and [DEASCH]<>"C38046" then 3 else [DEASCH])
in
#"Added Custom"
Best Regards
Hi @Anonymous ,
You can add a custom column in Power Query Editor with the below applied codes, please find the attachment for the details.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcgzydVbSUTKwNACSSrE6aCIKmELOxhYGJmaHFmCRMbEwMzfFIW6GQ9wch7glLpspt5d4GynRO3DhNNAisQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [FACILITY = _t, #"FACILITY ID" = _t, DEASCH = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"FACILITY", type text}, {"FACILITY ID", type text}, {"DEASCH", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if Text.Trim([DEASCH])<>"" and [DEASCH]<>"C38046" then 3 else [DEASCH])
in
#"Added Custom"
Best Regards
Hi,
Write this calculated column formula
=if(Data[deasch]="C48676" then 3,blank())
Hope this helps.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
80 | |
71 | |
51 | |
50 |
User | Count |
---|---|
128 | |
122 | |
77 | |
64 | |
60 |