Forum Discussion
Millstone1998
2 years agoFrequent Visitor
Transposed grids with text comparisons
Hi, I have an almost entirely text based dataset. I need to show some kind of visualisation of where the data has changed between two different dates. I can create the data model in pretty much...
lbendlin
2 years agoSuper User
Yes to the transpose (unpivot) but you would need to keep Product and Date static.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCs9MSU8tMVTSUfJKzNM1MgIyHJ2cdRRcXN10FNw9PIH8iMgoQwMDHYWAwCAjAwOgQFFqio5CflFiXnoqSDoCSERGKsXqYJhmjMU0H18/Y4Qp6UWpqXkwQ6KikAwxQnYSqn6IK1C0othvRMB+VP1AWyH6YwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ProductName = _t, Date = _t, Categories1 = _t, Categories2 = _t, Colour = _t, Europe = _t, Asia = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ProductName", type text}, {"Date", type date}, {"Categories1", type text}, {"Categories2", type text}, {"Colour", type text}, {"Europe", type text}, {"Asia", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"ProductName", "Date"}, "Attribute", "Value")
in
#"Unpivoted Other Columns"
You likely have more than two snapshots in your data so the actual comparison would have to be done in DAX.
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.