Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Millstone1998
Regular 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 any way that's suitable.  My question is: are there any recommended visualisation tools which would help display the data as simply as possible?

 

For example, if I had data that looked like this:

ProductNameDateCategories1Categories2ColourEuropeAsia
Widget1Jan-22ABC, DEF, GHIXYZ100, PQR200red, orangeXXYY
Widget1Jan-23ABC, DEF, GHILMN300red, greenXXZZ
Widget2Jan-22DEF, GHILMN200greenXXYY
Widget2Jan-23ABC, DEF, GHILMN200greenZZYY

 

The easiest option for the user would be to see the data transposed, with perhaps two rows (now columns) of data at a time that you can "page" through, with highlighted values where there are differences, so:

 

First set:

ProductNameWidget1Widget1
DateJan-22Jan-23
Categories1ABC, DEF, GHIABC, DEF, GHI
Categories2XYZ100, PQR200LMN300
Colourred, orangered, green
EuropeXXXX
AsiaYYZZ
AfricaZZZZ

 

Second set:

ProductNameWidget2Widget2
DateJan-22Jan-23
Categories1DEF, GHIABC, DEF, GHI
Categories2LMN200LMN200
Colourgreengreen
EuropeXXZZ
AsiaYYYY
AfricaZZXX

Transposing the data table in Power Query doesn't really give a suitable dataset.

I realise this isn't a natural use case for Power BI as it doesn't involve any summarisation.

Many thanks for any suggestions.

1 REPLY 1
lbendlin
Super User
Super 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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.