<?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 Set expression is preventing an If statement from running correctly in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-expression-is-preventing-an-If-statement-from-running/m-p/2510562#M104920</link>
    <description>&lt;P&gt;I have a Bar Chart with two dimensions (Provider and Date).&amp;nbsp; I then have a measure that contains a set expression (sum({&amp;lt;Date={"&amp;lt;=$(vDOS)"} NetRevenue)).&amp;nbsp; Then, I have an If Statement for the color of the bars (IF( Provider='ProvName',rgb(125,63,152),rgb(0,0,0)).&lt;/P&gt;&lt;P&gt;When I add a selection to the Date field, the dates outside the selected range turn black because the third section of the if statement says&amp;nbsp;rgb(0,0,0).&amp;nbsp; How can I keep the same colors (in this case, rgb(125,63,152)) regardless of the selections?&lt;/P&gt;&lt;P&gt;&lt;LI-PRODUCT title="Qlik Sense Desktop" id="qlikSenseDesktop"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Mar 2025 13:43:45 GMT</pubDate>
    <dc:creator>Todd_D</dc:creator>
    <dc:date>2025-03-19T13:43:45Z</dc:date>
    <item>
      <title>Set expression is preventing an If statement from running correctly</title>
      <link>https://community.qlik.com/t5/App-Development/Set-expression-is-preventing-an-If-statement-from-running/m-p/2510562#M104920</link>
      <description>&lt;P&gt;I have a Bar Chart with two dimensions (Provider and Date).&amp;nbsp; I then have a measure that contains a set expression (sum({&amp;lt;Date={"&amp;lt;=$(vDOS)"} NetRevenue)).&amp;nbsp; Then, I have an If Statement for the color of the bars (IF( Provider='ProvName',rgb(125,63,152),rgb(0,0,0)).&lt;/P&gt;&lt;P&gt;When I add a selection to the Date field, the dates outside the selected range turn black because the third section of the if statement says&amp;nbsp;rgb(0,0,0).&amp;nbsp; How can I keep the same colors (in this case, rgb(125,63,152)) regardless of the selections?&lt;/P&gt;&lt;P&gt;&lt;LI-PRODUCT title="Qlik Sense Desktop" id="qlikSenseDesktop"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 13:43:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-expression-is-preventing-an-If-statement-from-running/m-p/2510562#M104920</guid>
      <dc:creator>Todd_D</dc:creator>
      <dc:date>2025-03-19T13:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression is preventing and If statement from running correctly</title>
      <link>https://community.qlik.com/t5/App-Development/Set-expression-is-preventing-an-If-statement-from-running/m-p/2510564#M104921</link>
      <description>&lt;P&gt;Can you share a sample app to understand the problem better, I don't understand the exact situations with the selections you really don't want black color, I assume as long as Provider is equal to hardcoded provider name, it should show the primary color irrespective of dates you are selecting, and if selected dates are not associated with the hardcoded provider name in your color expression I guess you want to show them in black color.&lt;/P&gt;&lt;P&gt;More details wud help to understand your situation better.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 23:02:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-expression-is-preventing-an-If-statement-from-running/m-p/2510564#M104921</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2025-03-18T23:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression is preventing and If statement from running correctly</title>
      <link>https://community.qlik.com/t5/App-Development/Set-expression-is-preventing-an-If-statement-from-running/m-p/2510590#M104924</link>
      <description>&lt;P&gt;In your expression providing the result you have "filter" on which data to consider via the set expression, but in the coloring setup you the expression is not using the same "filter". Try applying the same set modifier to that expression as well.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;(IF( only({&amp;lt;Date={"&amp;lt;=$(vDOS)"}&amp;gt;} Provider) ='ProvName',rgb(125,63,152),rgb(0,0,0))&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 05:03:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-expression-is-preventing-an-If-statement-from-running/m-p/2510590#M104924</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2025-03-19T05:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression is preventing and If statement from running correctly</title>
      <link>https://community.qlik.com/t5/App-Development/Set-expression-is-preventing-an-If-statement-from-running/m-p/2510672#M104932</link>
      <description>&lt;P&gt;Thank you very much, this worked.&amp;nbsp; Can you explain why you need the "only" function here?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 13:39:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-expression-is-preventing-an-If-statement-from-running/m-p/2510672#M104932</guid>
      <dc:creator>Todd_D</dc:creator>
      <dc:date>2025-03-19T13:39:00Z</dc:date>
    </item>
  </channel>
</rss>

