<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Pivot table like a heatmap in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2423375#M95899</link>
    <description>&lt;P&gt;Hello both,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i use the two solution, Dimension in the script (AGGR is not aware with value list) and the two variables for colormix and it works.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sophie_bd_0-1708937148389.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/160625i064C79FBED23286A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sophie_bd_0-1708937148389.png" alt="sophie_bd_0-1708937148389.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So thanks both&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 08:46:11 GMT</pubDate>
    <dc:creator>sophie_bd</dc:creator>
    <dc:date>2024-02-26T08:46:11Z</dc:date>
    <item>
      <title>Pivot table like a heatmap</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2422299#M95786</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have a pivot with 2 dimensions Country and&amp;nbsp;ValueList('Famille','Sous-Famille', 'Segment')&lt;/P&gt;
&lt;P&gt;with one expression :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=&lt;BR /&gt;IF( ValueList('Famille','Sous-Famille', 'Segment') = 'Famille', [_AMOUNT (CC3 Famille NR)],&lt;BR /&gt;IF( ValueList('Famille','Sous-Famille', 'Segment') = 'Sous-Famille', [_AMOUNT (CC3 SS Famille NR)], &lt;BR /&gt;IF( ValueList('Famille','Sous-Famille', 'Segment') = 'Segment', [_AMOUNT (CC3 Segment NR)], &lt;BR /&gt;)))&lt;BR /&gt;/1000000&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i want to colorize the pivot table like a heatmap so i use this expression :&amp;nbsp;ColorMix1( rank(total column(1))/NoOfRows(TOTAL) , rgb(222,84,4), rgb(255,255,255))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but it doesn't work :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sophie_bd_0-1708608099716.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/160426iD11199598321B0D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sophie_bd_0-1708608099716.png" alt="sophie_bd_0-1708608099716.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do you have an idea for this problem ,&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Sophie&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 13:22:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2422299#M95786</guid>
      <dc:creator>sophie_bd</dc:creator>
      <dc:date>2024-02-22T13:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table like a heatmap</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2422378#M95796</link>
      <description>&lt;P&gt;First, calculate 2 variables that will calculate the maximum and minimum of your table (let's imagine with 3 measurements).&lt;BR /&gt;vTableMax:&lt;BR /&gt;&lt;EM&gt;$(=rangemax(max(aggr([Measure1],Country)),max(aggr([Measure2],Country)),max(aggr([Measure3],Country))))&lt;BR /&gt;&lt;/EM&gt;vTableMin&lt;BR /&gt;&lt;EM&gt;$(=rangemin(min(alt(aggr([Nb méd or],DelegationFr),0)),min(alt(aggr([Nb méd argent],DelegationFr)),0),min(alt(aggr([Nb méd bronze],DelegationFr)),0)))&lt;/EM&gt;&lt;BR /&gt;Next, go to the background function of each measure, and add this (example for the first measure):&lt;BR /&gt;=&lt;EM&gt;ColorMix1(([Measure1]-$(MinTable))/($(MaxTable)-$(MinTable)),RGB(255,23,23),RGB(102,104,0))&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Now you just have to adapt to your case, this solution is functional on my side.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d'écran 2024-02-22 152016.png" style="width: 716px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/160437iE04D6293B5AB6BD8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture d'écran 2024-02-22 152016.png" alt="Capture d'écran 2024-02-22 152016.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy your Qlik.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;Théo ATRAGIE.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 14:25:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2422378#M95796</guid>
      <dc:creator>theoat</dc:creator>
      <dc:date>2024-02-22T14:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table like a heatmap</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2422475#M95808</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;thanks for the answer, but i have only one mesure :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;IF( ValueList('Famille','Sous-Famille', 'Segment') = 'Famille', [_AMOUNT (CC3 Famille NR)],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IF( ValueList('Famille','Sous-Famille', 'Segment') = 'Sous-Famille', [_AMOUNT (CC3 SS Famille NR)],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IF( ValueList('Famille','Sous-Famille', 'Segment') = 'Segment', [_AMOUNT (CC3 Segment NR)],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sophie&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 16:12:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2422475#M95808</guid>
      <dc:creator>sophie_bd</dc:creator>
      <dc:date>2024-02-22T16:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table like a heatmap</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2422483#M95810</link>
      <description>&lt;P&gt;So, in this case, you have just to do this :&lt;BR /&gt;&lt;SPAN&gt;vTableMax:&lt;/SPAN&gt;&lt;BR /&gt;&lt;EM&gt;$(=max(aggr([Measure],Country)))&lt;BR /&gt;&lt;/EM&gt;&lt;SPAN&gt;vTableMin&lt;/SPAN&gt;&lt;BR /&gt;&lt;EM&gt;$(=min(alt(aggr([Measure],Country),0)))&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN&gt;Next, go to the background function of each column, add this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;EM&gt;ColorMix1(([Measure]-$(MinTable))/($(MaxTable)-$(MinTable)),RGB(255,23,23),RGB(102,104,0))&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 16:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2422483#M95810</guid>
      <dc:creator>theoat</dc:creator>
      <dc:date>2024-02-22T16:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table like a heatmap</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2423167#M95872</link>
      <description>&lt;P&gt;Hi both,&lt;/P&gt;
&lt;P&gt;I think that in order to work across the different values in the value list, that would also need to be added into the aggr statement. I don't think the aggr would be happy with a valuelist (but I've not tried it), but to make things simpler I would have the value list as a data island, created in the load script.&lt;/P&gt;
&lt;P&gt;Simply add this to the load script:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;CC3:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; CC3&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;INLINE [&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;CC3&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Famille&lt;BR /&gt;Sous-Famille&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Segment&lt;BR /&gt;];&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This will then give you a field in the data model you can add as a dimension to the pivot. Your expression then gets a whole lot tidier:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;=IF(CC3 = 'Famille', [_AMOUNT (CC3 Famille NR)],&lt;BR /&gt;IF(CC3 = 'Sous-Famille', [_AMOUNT (CC3 SS Famille NR)],&lt;BR /&gt;IF(CC3 = 'Segment', [_AMOUNT (CC3 Segment NR)],&lt;BR /&gt;)))&amp;nbsp;/1000000&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then the two variables that &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/249886"&gt;@theoat&lt;/a&gt;&amp;nbsp;suggests you create would have the dimension referenced there also:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;EM&gt;$(=max(aggr([Measure],Country,CC3)))&lt;/EM&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Feb 2024 19:43:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2423167#M95872</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2024-02-24T19:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table like a heatmap</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2423375#M95899</link>
      <description>&lt;P&gt;Hello both,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i use the two solution, Dimension in the script (AGGR is not aware with value list) and the two variables for colormix and it works.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sophie_bd_0-1708937148389.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/160625i064C79FBED23286A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sophie_bd_0-1708937148389.png" alt="sophie_bd_0-1708937148389.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So thanks both&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 08:46:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-table-like-a-heatmap/m-p/2423375#M95899</guid>
      <dc:creator>sophie_bd</dc:creator>
      <dc:date>2024-02-26T08:46:11Z</dc:date>
    </item>
  </channel>
</rss>

