<?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: Background color expression with a replacing value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Background-color-expression-with-a-replacing-value/m-p/141319#M1292333</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can increase your denominator by 0.0000001 for avoiding "division by zero" issues. Like that:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum([Current Month Actual Cost])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;( Sum([Current Month Budget Cost]) + &lt;SPAN style="font-size: 13.3333px;"&gt;0.0000001)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;It won't harm your calculations much and a background color should be all right.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Oct 2018 05:00:41 GMT</pubDate>
    <dc:creator>Sergey_Shuklin</dc:creator>
    <dc:date>2018-10-09T05:00:41Z</dc:date>
    <item>
      <title>Background color expression with a replacing value</title>
      <link>https://community.qlik.com/t5/QlikView/Background-color-expression-with-a-replacing-value/m-p/141318#M1292330</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;Apologies if the heading sounds awkward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, Ii want to apply an expression to a column named Variance (Budget Cost - Actual Cost). I am able to apply the expression correctly.&lt;/P&gt;&lt;P&gt;My background color&amp;nbsp; expression is,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Sum([Current Month Actual Cost])/Sum([Current Month Budget Cost]) &amp;gt; 1.25, Red(),&lt;/P&gt;&lt;P&gt;If(Sum([Current Month Actual Cost])/Sum([Current Month Budget Cost]) &amp;gt; 1.00, LightRed(),&lt;/P&gt;&lt;P&gt;Green() ))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using as a fraction so that I could represent the magnitude of the variance as a proportion to the Budgeted cost.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Despite all works well, I came across the below issue,&lt;/P&gt;&lt;P&gt;There are certain budgeted cost values where the value is "0" (zero). In a so called situation, the calculation of the variance is correct (which is -9500) but, the background color should be "Red" instead of "Green" ( Because it divides the "9500" by "0").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be an option to resolve this issue is to replace all the budgeted "0" values by "1" and performa the above said background expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I am not so sure how to perform the said task in the same background expression window (where I have written the above expression) so that, i will depict the correct variance values without harming the actual variance data along with the correct background color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone help me in this regards?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Background-color-expression-with-a-replacing-value/m-p/141318#M1292330</guid>
      <dc:creator>andymanu</dc:creator>
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Background color expression with a replacing value</title>
      <link>https://community.qlik.com/t5/QlikView/Background-color-expression-with-a-replacing-value/m-p/141319#M1292333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can increase your denominator by 0.0000001 for avoiding "division by zero" issues. Like that:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum([Current Month Actual Cost])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;( Sum([Current Month Budget Cost]) + &lt;SPAN style="font-size: 13.3333px;"&gt;0.0000001)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;It won't harm your calculations much and a background color should be all right.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2018 05:00:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Background-color-expression-with-a-replacing-value/m-p/141319#M1292333</guid>
      <dc:creator>Sergey_Shuklin</dc:creator>
      <dc:date>2018-10-09T05:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Background color expression with a replacing value</title>
      <link>https://community.qlik.com/t5/QlikView/Background-color-expression-with-a-replacing-value/m-p/141320#M1292337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sergey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your much valuable logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's absolutely correct and got the desired results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2018 05:10:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Background-color-expression-with-a-replacing-value/m-p/141320#M1292337</guid>
      <dc:creator>andymanu</dc:creator>
      <dc:date>2018-10-09T05:10:22Z</dc:date>
    </item>
  </channel>
</rss>

