Forum Discussion
Matrix style question - maybe a heat map?
I have the following information, and would love to create a Heatmap showing % and frequency. How can I do this? I do have the add-on "Table heatmap" if that helps in anyway. If not a heat map, a simple Matrix would be fine. Not sure how to do so.
My data sheet is called "Corrected" for any DAX
From this:
| Module 1 | Module 2 | Module 3 | Module 4 | Module 5 | Module 6 | Module 7 | Module 8 | Module 9 | Module 10 |
| NA | Moderately | Slightly | Moderately | Slightly | Moderately | Moderately | NA | Very | Very |
| Very | None at all | Very | NA | Moderately | None at all | Moderately | NA | None at all | Very |
| Very | Very | None at all | Very | Very | Slightly | Very | Very | Slightly | Moderately |
| Slightly | Very | NA | Moderately | Slightly | NA | None at all | Slightly | Very | NA |
| Very | Moderately | Slightly | Very | Moderately | Moderately | None at all | Very | None at all | Slightly |
| Very | None at all | Very | Very | NA | Very | Very | Very | Very | None at all |
Into this:
| NA | None at all | Slightly | Moderately | Very | |
| Module 1 | |||||
| Module 2 | |||||
| Module 3 | |||||
| Module 4 | |||||
| Module 5 | |||||
| Module 6 | |||||
| Module 7 | |||||
| Module 8 | |||||
| Module 9 | |||||
| Module 10 |
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8nNU0lHyzU9JLUosSc2pBHKCczLTM0rATKLEUThg48JSiyphVKxONIzvl5+XqpBYopCYk4NQhGk/qjJM07EYg2QJPrugFJJHcEogWQsyHFML3nDD4k6sJiC5G5dR2KTxBBdW78ONIxQZyH5DFcIdurGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Module 1" = _t, #"Module 2" = _t, #"Module 3" = _t, #"Module 4" = _t, #"Module 5" = _t, #"Module 6" = _t, #"Module 7" = _t, #"Module 8" = _t, #"Module 9" = _t, #"Module 10" = _t]), #"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Module", "Value") in #"Unpivoted Columns"Will need to provide sort orders and a proper data model.
2 Replies
- lbendlin
Super User
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8nNU0lHyzU9JLUosSc2pBHKCczLTM0rATKLEUThg48JSiyphVKxONIzvl5+XqpBYopCYk4NQhGk/qjJM07EYg2QJPrugFJJHcEogWQsyHFML3nDD4k6sJiC5G5dR2KTxBBdW78ONIxQZyH5DFcIdurGxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Module 1" = _t, #"Module 2" = _t, #"Module 3" = _t, #"Module 4" = _t, #"Module 5" = _t, #"Module 6" = _t, #"Module 7" = _t, #"Module 8" = _t, #"Module 9" = _t, #"Module 10" = _t]), #"Unpivoted Columns" = Table.UnpivotOtherColumns(Source, {}, "Module", "Value") in #"Unpivoted Columns"Will need to provide sort orders and a proper data model.
- samuelhowardFrequent Visitor
Thanks for the table example, however, this does not show the precentages as well (if its even possible).
How would the DAX code be written if my table is called "Corrected"? I am getting a series of errors when I try input it as a measure, and not sure where to make the changes needed to correct it. Maybe you can point them out for me.