<?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: conditional colour with substringcount not working properly in pivot table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1645944#M447524</link>
    <description>&lt;P&gt;Hi Stoyan,&lt;BR /&gt;&lt;BR /&gt;Thanks for this super quick reply.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Actually the left table is only designed as a chart for the purpose of showing it in the pivot style. There is no calculation or measurement about it apart from hiding the null values for ID.&lt;BR /&gt;&lt;BR /&gt;I recreated it as a table box and a listbox which return the same values of the left table:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="substringcount colour_1.png" style="width: 503px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23474i3C511A37CF982A26/image-size/large?v=v2&amp;amp;px=999" role="button" title="substringcount colour_1.png" alt="substringcount colour_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This leads to the assumption that an aggregation has to be implemented in the right table colour condition.&lt;/P&gt;&lt;P&gt;Actually the left table represents the following values &lt;STRONG&gt;=AGGR(ID, PBGA_MASTER_ID)&lt;/STRONG&gt;.&lt;BR /&gt;Now I am wondering how to apply this to the expression - if that would solve the problem.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2019 15:04:55 GMT</pubDate>
    <dc:creator>citizenk</dc:creator>
    <dc:date>2019-11-12T15:04:55Z</dc:date>
    <item>
      <title>conditional colour with substringcount not working properly in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1645916#M447520</link>
      <description>&lt;P&gt;Dear all,&lt;BR /&gt;&lt;BR /&gt;I am struggling with a scenario I faced several times.&lt;BR /&gt;&lt;BR /&gt;Based on a comparison I perform with a substringcount want to set the background of a cell. In a straight table this works, however when I have a pivot table not all the cells I expect are coloured.&lt;BR /&gt;&lt;BR /&gt;In this example I want to compare the values in the column "ID" of the left table with the values of the column ID in the right table.&lt;/P&gt;&lt;P&gt;Whenever there is a ID in the right table that is not in the left table it should get the background colour &lt;FONT color="#FF0000"&gt;red&lt;/FONT&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="substringcount colour.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23470iFA5F1AC98B669E63/image-size/large?v=v2&amp;amp;px=999" role="button" title="substringcount colour.png" alt="substringcount colour.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see some IDs are coloured while I would expect that all Porsche Cayenne would be red since none of them appears in the left table.&lt;BR /&gt;&lt;BR /&gt;The expression I used for setting the background colour of the column cells is:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;=if(SubStringCount(Concat(distinct LEFT_TABLE_ID, '|' ), RIGHT_TABLE_ID),white(),lightred())&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I already tried implementing some aggregations around some parts of this expression but nothing really worked out yet.&lt;BR /&gt;&lt;BR /&gt;Switching the table style to "straight table" everything turns out to be coloured correctly.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:41:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1645916#M447520</guid>
      <dc:creator>citizenk</dc:creator>
      <dc:date>2024-11-16T19:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: conditional colour with substringcount not working properly in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1645924#M447523</link>
      <description>&lt;P&gt;Hello CitizenK,&lt;/P&gt;&lt;P&gt;The substring function will work just fine. The problem may be in the LEFT TABLE IDs.&lt;/P&gt;&lt;P&gt;The left one looks like a table chart (not a regular table object). So I suspect there is a measure to it which may be hidden or cropped out of the picture. (if you create a list box with the Left-table-ID field you will see all values you truly pick in your Concat function)&lt;/P&gt;&lt;P&gt;What you see on the front end is not the entire set of "Left Table ID"s but just the ones that generate some non-zero value of the hidden expression.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the solution will look like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=if(SubStringCount(Concat({&amp;lt;HiddenMeasureField-={0}&amp;gt;} distinct LEFT_TABLE_ID, '|' ), RIGHT_TABLE_ID),white(),lightred())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, you may need to consider an Aggr() function to account for all other dimensions in the table chart to the left.&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;S.T.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 14:40:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1645924#M447523</guid>
      <dc:creator>Stoyan_Terziev</dc:creator>
      <dc:date>2019-11-12T14:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: conditional colour with substringcount not working properly in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1645944#M447524</link>
      <description>&lt;P&gt;Hi Stoyan,&lt;BR /&gt;&lt;BR /&gt;Thanks for this super quick reply.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Actually the left table is only designed as a chart for the purpose of showing it in the pivot style. There is no calculation or measurement about it apart from hiding the null values for ID.&lt;BR /&gt;&lt;BR /&gt;I recreated it as a table box and a listbox which return the same values of the left table:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="substringcount colour_1.png" style="width: 503px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23474i3C511A37CF982A26/image-size/large?v=v2&amp;amp;px=999" role="button" title="substringcount colour_1.png" alt="substringcount colour_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This leads to the assumption that an aggregation has to be implemented in the right table colour condition.&lt;/P&gt;&lt;P&gt;Actually the left table represents the following values &lt;STRONG&gt;=AGGR(ID, PBGA_MASTER_ID)&lt;/STRONG&gt;.&lt;BR /&gt;Now I am wondering how to apply this to the expression - if that would solve the problem.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 15:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1645944#M447524</guid>
      <dc:creator>citizenk</dc:creator>
      <dc:date>2019-11-12T15:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: conditional colour with substringcount not working properly in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1645962#M447525</link>
      <description>&lt;P&gt;Hi CitizenK,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think few clarifications may be needed here. But quick solution may be in place.&lt;/P&gt;&lt;P&gt;Can you try this:&lt;/P&gt;&lt;P&gt;=IF(SubStringCount(&lt;BR /&gt;'-'&amp;amp;concat({&amp;lt;LEFT_TABLE_ID={"*"}&amp;gt;}DISTINCT LEFT_TABLE_ID, '-')&amp;amp;'-',&lt;BR /&gt;'-'&amp;amp;RIGHT_TABLE_ID&amp;amp;'-'&lt;BR /&gt;), White(),LightRed()&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And if it doesn't work - we need to collect some more details.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;S.T.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 15:27:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1645962#M447525</guid>
      <dc:creator>Stoyan_Terziev</dc:creator>
      <dc:date>2019-11-12T15:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: conditional colour with substringcount not working properly in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1647985#M447641</link>
      <description>&lt;P&gt;Ringo, did Stoyan's last post get you what you needed to get a working solution?&amp;nbsp; If so, please be sure to return to the thread and use the Accept as Solution button on his post to give him credit and let other Community members know it did work.&amp;nbsp; Regarding the AGGR side of things, Do a search on AGGR in the following link and check out those posts, as they may be helpful in your use case, was not sure which one(s) might be most helpful.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2019 14:24:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1647985#M447641</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-11-18T14:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: conditional colour with substringcount not working properly in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1680246#M450010</link>
      <description>&lt;P&gt;The solution (even if it is a workaround womehow:&lt;BR /&gt;&lt;BR /&gt;I stopped forcing the dimension to colour the gaps and instead coloured the expressions which works like a charm for the Pivot table.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="solution - colour the expression, not the dimension" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/29291iB8262793EA9C4743/image-size/large?v=v2&amp;amp;px=999" role="button" title="solution.png" alt="solution - colour the expression, not the dimension" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;solution - colour the expression, not the dimension&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 09:27:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/conditional-colour-with-substringcount-not-working-properly-in/m-p/1680246#M450010</guid>
      <dc:creator>citizenk</dc:creator>
      <dc:date>2020-02-28T09:27:32Z</dc:date>
    </item>
  </channel>
</rss>

