Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Existing column Required ouptut on custom column
BAB 0
BAB 1
BAB 2
CIC 0
CIC 1
CIC 2
CIC 3
CIC 4
DDE 0
DDE 1
This is a very important issue for our business and despite the simple form I couldn't solve it in Power BI, until now. It needs to be done in M Querry, in order to allow a subsequent join with another table / data source, so a DAX solution will not help.
Solved! Go to Solution.
Hi @nazdravanul,
I copied and pasted your data in my model ( I called Data), and this is the Power Query code ( with Advanced Editor) :
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnJ0UorVwaSdPZ2Jol1cXBF0LAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Test = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Test", type text}}), #"Grouped Rows" = Table.Group(#"Changed Type", {"Test"}, {{"Count", each Table.AddIndexColumn(_,"Index",0,1), type table}}), #"Expanded Count" = Table.ExpandTableColumn(#"Grouped Rows", "Count", {"Index"}, {"Index"}) in #"Expanded Count"
So you can replace the source and then copy and paste the rest....
Ninter...
Hi @nazdravanul,
I copied and pasted your data in my model ( I called Data), and this is the Power Query code ( with Advanced Editor) :
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnJ0UorVwaSdPZ2Jol1cXBF0LAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Test = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Test", type text}}), #"Grouped Rows" = Table.Group(#"Changed Type", {"Test"}, {{"Count", each Table.AddIndexColumn(_,"Index",0,1), type table}}), #"Expanded Count" = Table.ExpandTableColumn(#"Grouped Rows", "Count", {"Index"}, {"Index"}) in #"Expanded Count"
So you can replace the source and then copy and paste the rest....
Ninter...
Thank you very much - with a bit of tinkering, in order to adjust it to my existing querry, this worked like a charm! 🙂
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
37 | |
31 | |
26 |
User | Count |
---|---|
95 | |
50 | |
43 | |
40 | |
35 |