<?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 Dimension Background color workaround in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pivot-Dimension-Background-color-workaround/m-p/1726221#M506052</link>
    <description>&lt;P&gt;Just one additional comment, maybe in this case replacing the nulls with value of 0 might be the better option on this application, just wanted to toss that out as an idea too.&amp;nbsp; I am going to mark your post with what you did as the solution, thanks to Taoufiq for the suggestions and confirmation on things too.&lt;/P&gt;&lt;P&gt;Maybe this help link will better explain:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/NullAsValue.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/NullAsValue.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Brett&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jul 2020 17:53:41 GMT</pubDate>
    <dc:creator>Brett_Bleess</dc:creator>
    <dc:date>2020-07-08T17:53:41Z</dc:date>
    <item>
      <title>Pivot Dimension Background color workaround</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Dimension-Background-color-workaround/m-p/1720484#M506048</link>
      <description>&lt;P&gt;Hey there!&lt;/P&gt;&lt;P&gt;I'm using a pivot table, and I need to change a dimensions background color depending on the type of the event happening that day. Below is how the table should look according to what I mention.&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tables.png" style="width: 577px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35889i86806CB5E5E31D98/image-size/large?v=v2&amp;amp;px=999" role="button" title="tables.png" alt="tables.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, here is the data I'm using (its just a sample &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;TABLE width="438"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="438"&gt;Fact&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Region&lt;/TD&gt;&lt;TD&gt;Shipping Date&lt;/TD&gt;&lt;TD&gt;Delivery Date&lt;/TD&gt;&lt;TD&gt;#Units&lt;/TD&gt;&lt;TD&gt;%IdEvent&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NORTH&lt;/TD&gt;&lt;TD&gt;13/06/2020&lt;/TD&gt;&lt;TD&gt;14/06/2020&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;NORTH&lt;/TD&gt;&lt;TD&gt;14/06/2020&lt;/TD&gt;&lt;TD&gt;14/06/2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SOUTH&lt;/TD&gt;&lt;TD&gt;15/06/2020&lt;/TD&gt;&lt;TD&gt;17/06/2020&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;EAST&lt;/TD&gt;&lt;TD&gt;16/06/2020&lt;/TD&gt;&lt;TD&gt;18/06/2020&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;WEST&lt;/TD&gt;&lt;TD&gt;13/06/2020&lt;/TD&gt;&lt;TD&gt;14/06/2020&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;WEST&lt;/TD&gt;&lt;TD&gt;16/06/2020&lt;/TD&gt;&lt;TD&gt;16/06/2020&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE width="251"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="251"&gt;Events&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;%IdEvent&lt;/TD&gt;&lt;TD&gt;Event&lt;/TD&gt;&lt;TD&gt;Color&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;RED()&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;BLUE()&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I cant come with the right set analysis to get the background color to work as expected. Can anyone maybe point me to the right direction ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 20:06:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Dimension-Background-color-workaround/m-p/1720484#M506048</guid>
      <dc:creator>digichap28</dc:creator>
      <dc:date>2020-06-19T20:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Dimension Background color workaround</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Dimension-Background-color-workaround/m-p/1720665#M506049</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/8612"&gt;@digichap28&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unchecking 'Suppress Zero-Values' on the presentation tab&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35940i6E6FFE88068E56F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tested for example Event-&amp;gt;background :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=if(Event='A',red(),if(Event='B',Blue()))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if check :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 994px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35941iD3404160DBFDEFCF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="Capture1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;unchecking&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 959px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35942i14549070F23AEB58/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jun 2020 21:51:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Dimension-Background-color-workaround/m-p/1720665#M506049</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-06-21T21:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Dimension Background color workaround</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Dimension-Background-color-workaround/m-p/1721349#M506050</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/56648"&gt;@Taoufiq_Zarra&lt;/a&gt;&amp;nbsp; - thanks for taking your time to check this out. I tried what you mention and it didnt work according to my data. I mentioned the data posted was only a sample, and probably should have provided more info about the real one. Here are more details about it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* There are more than 50 events during the year, and there could be a few different depending on the year. Thus, using that many nested IF's would be crazy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;* The background color depends on the type of event. There are 3.&lt;/P&gt;&lt;P&gt;* The table should only show 30 days (Delivery Date) to the past &amp;nbsp;according to a user selection, and the month (shipping date) also decided by the user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Taking the above into account, what I have now is an event table as follow (it is again a sample):&lt;/P&gt;&lt;TABLE width="251"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="91"&gt;%IdEvent&lt;/TD&gt;&lt;TD width="80"&gt;Event Name&lt;/TD&gt;&lt;TD width="80"&gt;_EventType&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is basically my set analysis&lt;/STRONG&gt;:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;SUM( { &amp;lt;_DataSet = {$(fHistoricalData),$(fFutureData)}, [Delivery Date] = {"&amp;gt;=$(ui30DaysBefore) &amp;lt;=$(uiMaxDate)"}, [Shipping Year] = UserDate::[Stay Year], [Shipping Month] = UserDate::[Stay Month]&amp;gt;} #Units )&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;As per the BG color expression. This is the one I have&lt;/STRONG&gt;:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;IF( DIMENSIONALITY() &amp;lt;&amp;gt; 0,

IF( ONLY( { &amp;lt;_DataSet = {$(fHistoricalData),$(fFutureData)}, [Delivery Date] = {"&amp;gt;=$(ui30DaysBefore) &amp;lt;=$(uiMaxDate)"},  [Shipping Year] = UserDate::[Stay Year], [Shipping Month] = UserDate::[Stay Month]&amp;gt;} _EventType ) = 0, green(),
IF( ONLY( { &amp;lt;_DataSet = {$(fHistoricalData),$(fFutureData)}, [Delivery Date] = {"&amp;gt;=$(ui30DaysBefore) &amp;lt;=$(uiMaxDate)"}, [Shipping Year] = UserDate::[Stay Year], [Shipping Month] = UserDate::[Stay Month]&amp;gt;} _EventType ) = 1, yellow(),
IF( ONLY( { &amp;lt;_DataSet = {$(fHistoricalData),$(fFutureData)}, [Delivery Date] = {"&amp;gt;=$(ui30DaysBefore) &amp;lt;=$(uiMaxDate)"}, [Shipping Year] = UserDate::[Stay Year], [Shipping Month] = UserDate::[Stay Month]&amp;gt;} _EventType ) = 2, blue()

)))

)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The BG color would work if the first Shipping date holds a value, if it doesnt, then it wouldnt as I'm showing below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura.PNG" style="width: 483px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36107i9293D53BE914964D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura.PNG" alt="Captura.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;What I noticed is that adding the dimension _EventType next to the [Event Name], would force it to set the BG color.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tables.png" style="width: 564px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36108i8D3F528FB4E08162/image-size/large?v=v2&amp;amp;px=999" role="button" title="tables.png" alt="tables.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thus, for now what I'm doing is to set the _EventType font color to white and reduce the column width to the minimum so the user wouldnt notice it. I know this isnt the best solution, but it is working for me now. Nevertheless, I would love to know which should be the right way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Diego&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 15:36:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Dimension-Background-color-workaround/m-p/1721349#M506050</guid>
      <dc:creator>digichap28</dc:creator>
      <dc:date>2020-06-23T15:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Dimension Background color workaround</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Dimension-Background-color-workaround/m-p/1721353#M506051</link>
      <description>&lt;P&gt;fyes this trick will work well, what is important is to avoid null values after this Event Name Field&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 15:50:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Dimension-Background-color-workaround/m-p/1721353#M506051</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-06-23T15:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Dimension Background color workaround</title>
      <link>https://community.qlik.com/t5/QlikView/Pivot-Dimension-Background-color-workaround/m-p/1726221#M506052</link>
      <description>&lt;P&gt;Just one additional comment, maybe in this case replacing the nulls with value of 0 might be the better option on this application, just wanted to toss that out as an idea too.&amp;nbsp; I am going to mark your post with what you did as the solution, thanks to Taoufiq for the suggestions and confirmation on things too.&lt;/P&gt;&lt;P&gt;Maybe this help link will better explain:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/NullAsValue.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/NullAsValue.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 17:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pivot-Dimension-Background-color-workaround/m-p/1726221#M506052</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-07-08T17:53:41Z</dc:date>
    </item>
  </channel>
</rss>

