The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello.
I'd like to add a custom column in power query that allows me to obtain the corresponding value in column 1 based on a certain Index value, ie., I'd like to obtain for index=12 the letter M for all rows in the new custom column. How do I do this?
Thanks in advance.
@Greg_Deckler But in the new custom column I want to obtain only the value in column 1 corresponding to index number = 12 ,ie, a column where all the rows equal "M"...
Hi @filiparibeiro ,
Like this?
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("HcTHEYMwAACwXfxmCWoooYROfN5/De6kh2IMeUhZDIVLV67d+OPWnXsP/nr05NmLf169effh05dvP/6HlF4=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1, Int64.Type),
#"Step Name" = Table.SelectRows(#"Added Index", each [Index] = 12)[Column1]
in
#"Step Name"
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
@filiparibeiro Use a Merge step?