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.
Hello,
I'm quite new to DAX. I need your help for transforming a table from somthing like:
Name | Type
A | f,g
B | f,i,h
C | p
into something like:
Name | Type
A | f
A | g
B | f
B | i
B | h
C | p
Thanks in advance!
Solved! Go to Solution.
Hi @Anonymous
you can do it like this:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUUrTSVeK1YlWcgKzM3UywDxnIK9AKTYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Name = _t, Type = _t]), ChangedType = Table.TransformColumnTypes(Source,{{"Name", type text}, {"Type", type text}}), SplitColumnbyDelimiter = Table.ExpandListColumn(Table.TransformColumns(ChangedType, {{"Type", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Type") in SplitColumnbyDelimiter
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Hi @Anonymous
you can do it like this:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUUrTSVeK1YlWcgKzM3UywDxnIK9AKTYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Name = _t, Type = _t]), ChangedType = Table.TransformColumnTypes(Source,{{"Name", type text}, {"Type", type text}}), SplitColumnbyDelimiter = Table.ExpandListColumn(Table.TransformColumns(ChangedType, {{"Type", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Type") in SplitColumnbyDelimiter
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Thanks, that's solved the problem like a charm!
User | Count |
---|---|
73 | |
70 | |
38 | |
25 | |
23 |
User | Count |
---|---|
96 | |
93 | |
50 | |
43 | |
42 |