Forum Discussion

samuelhoward's avatar
samuelhoward
Frequent Visitor
1 year ago
Solved

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 1Module 2Module 3Module 4Module 5Module 6Module 7Module 8Module 9Module 10
NAModeratelySlightlyModeratelySlightlyModeratelyModeratelyNAVeryVery
VeryNone at allVeryNAModeratelyNone at allModeratelyNANone at allVery
VeryVeryNone at allVeryVerySlightlyVeryVerySlightlyModerately
SlightlyVeryNAModeratelySlightlyNANone at allSlightlyVeryNA
VeryModeratelySlightlyVeryModeratelyModeratelyNone at allVeryNone at allSlightly
VeryNone at allVeryVeryNAVeryVeryVeryVeryNone at all

 

Into this:

 NANone at allSlightlyModeratelyVery
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

  •  

    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.

     

     

  • samuelhoward's avatar
    samuelhoward
    Frequent 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.