March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi All,
I want to count a set of consecutive digits from a product field called ‘Products’[Code].
Counting how many times the current digit appears consecutively from the current position.
For example.
thanks
Solved! Go to Solution.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMrGwsDA3NrYwVorViVYyNDAA00ZG5pYWFkZGSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Added Column" = Table.AddColumn(Source, "cnt", each Text.Combine(List.Transform(List.Select(Table.Group(Table.FromList(Text.ToList([Column1])), "Column1", {"grp", Table.RowCount}, 0)[grp], each _>1), Text.From)))
in
#"Added Column"
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
A better inspiration came up during my supper.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMrGwsDA3NrYwVorViVYyNDAA00ZG5pYWFkZGSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Added Column" = Table.AddColumn(Source, "cnt", each Text.Combine(List.Transform(List.Select(List.Accumulate(Text.ToList([Column1]), {"", 0}, (s,c) => if c=s{0} then List.RemoveLastN(s) & {List.Last(s) + 1} else {c} & s & {1}), each try _>1 otherwise false), Text.From)))
in
#"Added Column"
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMrGwsDA3NrYwVorViVYyNDAA00ZG5pYWFkZGSrGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Added Column" = Table.AddColumn(Source, "cnt", each Text.Combine(List.Transform(List.Select(Table.Group(Table.FromList(Text.ToList([Column1])), "Column1", {"grp", Table.RowCount}, 0)[grp], each _>1), Text.From)))
in
#"Added Column"
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
116 | |
83 | |
77 | |
66 | |
57 |
User | Count |
---|---|
132 | |
113 | |
98 | |
78 | |
78 |