Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All, how are you?? I need some help.
I've a table with some columns
Date | OrganizationType | RazonSocial |
01/11/2017 | PARTICULAR | |
01/04/2016 | CORPORATIVO | CLEO INFORMACION ESPECIALIZADA SRL |
01/04/2017 | CORPORATIVO | CLEO INFORMACION ESPECIALIZADA SRL |
01/10/2016 | PARTICULAR |
I need to replace OrganizationType with "DIRECT" when RazonSocial have "PARTICULAR".
I tried with Table.ReplaceValue, but i couldn't make it.
You could always do something like this:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQ3NNQ3MjA0V9JRAqIAx6AQT+dQH8cgpVgdkKwJSNIMKOPsHxTgH+QY4hnmD+Q9augGImcfV38FTz83/yBfR2dPfz8F1+AAV2dPRx/PKEcXR4XgIB9kU8wpNcXQAOYYNJfGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Date = _t, OrganizationType = _t, RazonSocial = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"OrganizationType", type text}, {"RazonSocial", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if [RazonSocial] = "PARTICULAR" then "DIRECT" else [OrganizationType]), #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"OrganizationType"}), #"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Custom", "OrganizationType"}}) in #"Renamed Columns"
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |