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
CatalystHealth
Frequent Visitor

Visual showing 3 x 3 grid of performance and potential from a single row with multiple columns

I'm trying to figure out how to render a 3 x 3 (9 block grid) to show performance and potential.

 

The data source is a single row with 9 columns.  Key to the situation is that the data is coming as a CSV in rows and it would be very difficult to change the structure of the source data.  The 9 columns have headings A to I and I want to be able to allocate the values to the boxes with the corresponding letters.

 

 

 

 

In the above example the value for A (1) would go into Low/Low, B (2) into Medium (x axis) Low (y axis) and so on.

 

Therefore the result would look like this:

 

What is the best way to achieve this?

I thought I might be able to use a table or matrix but have been unsuccessful.

 

The solution posted here is similar however I don't see how it will work with how my data is formatted.

http://community.powerbi.com/t5/Desktop/Showing-multiple-text-values-in-a-matrix/td-p/169919

1 ACCEPTED SOLUTION

OK, here is what I did. First, in the query, unpivot all of your columns:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTICYmMgNgFiUyA2A2JzILYAYkul2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [A = _t, B = _t, C = _t, D = _t, E = _t, F = _t, G = _t, H = _t, I = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"A", Int64.Type}, {"B", Int64.Type}, {"C", Int64.Type}, {"D", Int64.Type}, {"E", Int64.Type}, {"F", Int64.Type}, {"G", Int64.Type}, {"H", Int64.Type}, {"I", Int64.Type}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {}, "Attribute", "Value")
in
    #"Unpivoted Columns"

Then, add this calculated column:

Rank = RANKX(Ranking,Ranking[Value])

Then, put this together using lines and text boxes and card visualizations. Filter each visualization to the specific rank value that you want in that box.

 

matrix.png

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
Greg_Deckler
Super User
Super User

Just confirming, which columns go in which boxes in the matrix is dependent upon their values, correct?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

The values in the row, for each Column, would be mapped to the corresponding spot in the matrix as per following image:

So yes, the matrix is dependent on the values.   No calculations are required, it's just displaying the values in the appropriate location.

The labels on the X axis represent 'Performance' and the labels on the Y axis represent 'Potential'.

OK, here is what I did. First, in the query, unpivot all of your columns:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTICYmMgNgFiUyA2A2JzILYAYkul2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [A = _t, B = _t, C = _t, D = _t, E = _t, F = _t, G = _t, H = _t, I = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"A", Int64.Type}, {"B", Int64.Type}, {"C", Int64.Type}, {"D", Int64.Type}, {"E", Int64.Type}, {"F", Int64.Type}, {"G", Int64.Type}, {"H", Int64.Type}, {"I", Int64.Type}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {}, "Attribute", "Value")
in
    #"Unpivoted Columns"

Then, add this calculated column:

Rank = RANKX(Ranking,Ranking[Value])

Then, put this together using lines and text boxes and card visualizations. Filter each visualization to the specific rank value that you want in that box.

 

matrix.png

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks so much Smoupre.

 

I think the solution I need is as simple as creating the grid using Cards and assigning each Columns value to that card.  A very simple and effective approach; I'm new to Power BI so wasn't aware of how simple it could be!

 

I'll have a look at implementing and call on further help if required.

 

FYI - in the example I provided the ordering of numerical values is not important (as in I don't need to place onto the grid in any sort of rank).  What's important is that the value from Column A is placed in the A location on the grid, the value from Column B is place in the B location on the grid, and so on...  As I understand, I can achieve this by creating Cards for A -> I and just mapping the appropriate columns to each Card.  As such, I don't believe I need to use the approach in your latest example which unpivots the columns and then uses RANKX.

You could always use a RANKX to rank them and then do 9 card visualizations, each filtered to the correct rank. Couple that with a few lines and some text and you should have what you want.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.