<?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: Comparing two columns and show BG color in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910580#M988340</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have solved the problem. In my previous version, the column 60 and 70 are separate expressions I created using set Analysis. They are actually under one column called Revision in the table. Now I added in Revision as a dimension and move it to the row, and the color appears to be correct now. I am not sure how it is related.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2015 03:16:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-07-24T03:16:54Z</dc:date>
    <item>
      <title>Comparing two columns and show BG color</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910572#M988332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks for all your time for viewing this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I have searched through the forum but could not find a solution to my problem.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;What I am trying to do is to compare two columns in a pivot table, and show red in bg if the value in the second column is greater than the first, and green if the second less than the first. I've tried to use both the column expression as well as the function column() to compare the two values. However, none of them returned the correct visual cues.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The bg color changed correctly for all the correct comparison. However, it also changed sometimes when the values are the same.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The expression I used:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(avg({$&amp;lt;Revision={'70'}&amp;gt;}CPU)&amp;gt;avg({$&amp;lt;Revision={'60'}&amp;gt;}CPU), lightred(),&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(avg({$&amp;lt;Revision={'70'}&amp;gt;}CPU)&amp;lt;avg({$&amp;lt;Revision={'60'}&amp;gt;}CPU),green()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(column(2)&amp;gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;column(1)&lt;/SPAN&gt;, lightred(),&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;column(2)&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;column(1)&lt;/SPAN&gt;,green()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;in the definition of bg color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Anyone has any idea what's wrong with this?&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 03:02:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910572#M988332</guid>
      <dc:creator />
      <dc:date>2015-07-23T03:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two columns and show BG color</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910573#M988333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In chart properites -&amp;gt; number tab, changed the fixed decimal point from 2 to 7(for ex), and you can able to find the difference between 2 columns. There might be a small difference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case, you can use Round(), Ceil() or Floor() function based on your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 09:42:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910573#M988333</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2015-07-23T09:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two columns and show BG color</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910574#M988334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you rounding expressions to 2 dp? If you are then you may be obscuring the 'true' values of column 1 and oclumn 2 e.g. column 1 may be 16.68 and column 2 may be 16.66 - both round to 16.70, but column 2 is really less than column 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Azam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 09:45:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910574#M988334</guid>
      <dc:creator>a_mullick</dc:creator>
      <dc:date>2015-07-23T09:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two columns and show BG color</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910575#M988335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Suspected what you said as well. However, the actual value for 16.80 is 16.8. It appears to be 16.80 because I set it to be fixed to 2 decimal point. So it is not because of rounding of numbers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 10:16:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910575#M988335</guid>
      <dc:creator />
      <dc:date>2015-07-23T10:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two columns and show BG color</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910576#M988336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;‌Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to my post above. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 10:17:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910576#M988336</guid>
      <dc:creator />
      <dc:date>2015-07-23T10:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two columns and show BG color</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910577#M988337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please share your app??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 10:23:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910577#M988337</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-07-23T10:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two columns and show BG color</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910578#M988338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide sample data &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 10:23:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910578#M988338</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2015-07-23T10:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two columns and show BG color</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910579#M988339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Try,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Expression_1&amp;gt;=After(Expression_2) or Expression_1&amp;gt;=Before(Expression_2),'▲','▼'))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 10:55:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910579#M988339</guid>
      <dc:creator>vardhancse</dc:creator>
      <dc:date>2015-07-23T10:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two columns and show BG color</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910580#M988340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have solved the problem. In my previous version, the column 60 and 70 are separate expressions I created using set Analysis. They are actually under one column called Revision in the table. Now I added in Revision as a dimension and move it to the row, and the color appears to be correct now. I am not sure how it is related.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 03:16:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-columns-and-show-BG-color/m-p/910580#M988340</guid>
      <dc:creator />
      <dc:date>2015-07-24T03:16:54Z</dc:date>
    </item>
  </channel>
</rss>

