Forum Discussion
unpivot table with milestones
- 6 years ago
Hi Anonymous
yes, make sure your headers contain characters that make splitting like in the following example possible:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8nQxVNJRAmEjIDYGYhOlWB2QOIhvCsRmQGwOxBZKsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ID = _t, A_1 = _t, A_2 = _t, B_1 = _t, B_2 = _t]), #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"ID"}, "Attribute", "Value"), #"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Attribute", Splitter.SplitTextByDelimiter("_", QuoteStyle.Csv), {"Attribute.1", "Attribute.2"}), #"Pivoted Column" = Table.Pivot(#"Split Column by Delimiter", List.Distinct(#"Split Column by Delimiter"[Attribute.1]), "Attribute.1", "Value") in #"Pivoted Column"attaching file as well
Hi Anonymous
yes, make sure your headers contain characters that make splitting like in the following example possible:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8nQxVNJRAmEjIDYGYhOlWB2QOIhvCsRmQGwOxBZKsbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ID = _t, A_1 = _t, A_2 = _t, B_1 = _t, B_2 = _t]),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"ID"}, "Attribute", "Value"),
#"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Attribute", Splitter.SplitTextByDelimiter("_", QuoteStyle.Csv), {"Attribute.1", "Attribute.2"}),
#"Pivoted Column" = Table.Pivot(#"Split Column by Delimiter", List.Distinct(#"Split Column by Delimiter"[Attribute.1]), "Attribute.1", "Value")
in
#"Pivoted Column"
attaching file as well
it works, thanks a lot.
I need the data for a Gantt Chart - now i have my attributes and my start and end date.
Is it possible to show shifts in a different color?
like this example:
- ImkeF6 years ago
Community Champion
Hi Anonymous
please open another thread for this, as this is a completely other topic and should have different title/tags.
In there, please make sure to clarify if you're actually looking for an Excel-solution or a Power BI.
You should also clarify where to find the criteria that makes the distinction between the 2 statuses.