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 folks, I'm hoping someone might be able to help. I have a column with a large number of words in each row, and I'd like to create a custom column to count the instances of words in each row, but only where the words are 6 characters or longer.
Any help would be appreciated 🙂
Solved! Go to Solution.
@MichaelHutchens , A new column in power query
List.Count( List.Select(List.Transform( Text.Split([Column1]," ") , each Text.Length(_) ), each _ >=6))
Test code for Power Query, paste in blank Query
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSkxKTklNU4BQ6RkgBhArxcYCAA==", 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 Custom" = Table.AddColumn(#"Changed Type", "Custom", each List.Count( List.Select(List.Transform( Text.Split([Column1]," ") , each Text.Length(_) ), each _ >=6)))
in
#"Added Custom"
@MichaelHutchens , A new column in power query
List.Count( List.Select(List.Transform( Text.Split([Column1]," ") , each Text.Length(_) ), each _ >=6))
Test code for Power Query, paste in blank Query
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSkxKTklNU4BQ6RkgBhArxcYCAA==", 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 Custom" = Table.AddColumn(#"Changed Type", "Custom", each List.Count( List.Select(List.Transform( Text.Split([Column1]," ") , each Text.Length(_) ), each _ >=6)))
in
#"Added Custom"
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 |
---|---|
107 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |