Forum Discussion
Ir contando repetidos con power Query
- 5 years ago
Hello lucho
you can use the groupfunction and apply the function to count rows.
Here an example where I first make distinct values of a table and then a row count with table.group using the basic table.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclSK1UElnXCQzjAyFgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [DoubleValues = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"DoubleValues", type text}}), #"Removed Duplicates" = Table.Distinct(#"Changed Type"), Count = Table.Group ( #"Changed Type", "DoubleValues", {{"Count", each List.Count(_[DoubleValues])}}, GroupKind.Global ) in CountCopy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello lucho
you can use the groupfunction and apply the function to count rows.
Here an example where I first make distinct values of a table and then a row count with table.group using the basic table.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclSK1UElnXCQzjAyFgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [DoubleValues = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"DoubleValues", type text}}),
#"Removed Duplicates" = Table.Distinct(#"Changed Type"),
Count = Table.Group
(
#"Changed Type",
"DoubleValues",
{{"Count", each List.Count(_[DoubleValues])}},
GroupKind.Global
)
in
Count
Copy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy