<?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 If and else condition Not working without the filter. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/If-and-else-condition-Not-working-without-the-filter/m-p/2017628#M84032</link>
    <description>&lt;P&gt;So to put it in a simple way, there is an if and else condition that is based on 3 fields and three tags associated to it. The app and logic was working before, the code is shown as below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The logic works fine when you have selected the filter (i.e Registration Number =0), otherwise it shows 0 value. I am not able to understand why its not working anymore and how to resolve it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Num((Count((If(MY_AUDI_Vehicle_VIN=VIN, &lt;BR /&gt;(if(registrationNumber_tag=0,registrationNumber,&lt;BR /&gt;if([Reg. No._tag]=0, [Reg. No.]))),&lt;BR /&gt;If(DMS_VIN=VIN,(if(registrationNumber_tag=0,registrationNumber,&lt;BR /&gt;if([Reg. No._tag]=0, [Reg. No.]))))&lt;BR /&gt;))&lt;BR /&gt;))&lt;/P&gt;</description>
    <pubDate>Sat, 17 Dec 2022 12:45:18 GMT</pubDate>
    <dc:creator>deepanshuSh</dc:creator>
    <dc:date>2022-12-17T12:45:18Z</dc:date>
    <item>
      <title>If and else condition Not working without the filter.</title>
      <link>https://community.qlik.com/t5/App-Development/If-and-else-condition-Not-working-without-the-filter/m-p/2017628#M84032</link>
      <description>&lt;P&gt;So to put it in a simple way, there is an if and else condition that is based on 3 fields and three tags associated to it. The app and logic was working before, the code is shown as below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The logic works fine when you have selected the filter (i.e Registration Number =0), otherwise it shows 0 value. I am not able to understand why its not working anymore and how to resolve it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Num((Count((If(MY_AUDI_Vehicle_VIN=VIN, &lt;BR /&gt;(if(registrationNumber_tag=0,registrationNumber,&lt;BR /&gt;if([Reg. No._tag]=0, [Reg. No.]))),&lt;BR /&gt;If(DMS_VIN=VIN,(if(registrationNumber_tag=0,registrationNumber,&lt;BR /&gt;if([Reg. No._tag]=0, [Reg. No.]))))&lt;BR /&gt;))&lt;BR /&gt;))&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2022 12:45:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-and-else-condition-Not-working-without-the-filter/m-p/2017628#M84032</guid>
      <dc:creator>deepanshuSh</dc:creator>
      <dc:date>2022-12-17T12:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: If and else condition Not working without the filter.</title>
      <link>https://community.qlik.com/t5/App-Development/If-and-else-condition-Not-working-without-the-filter/m-p/2017687#M84042</link>
      <description>&lt;P&gt;Hi, if an expression (or field) has more than one possible value it returns null, so maybe&amp;nbsp;&lt;SPAN&gt;registrationNumber_tag=0 or&amp;nbsp;[Reg. No._tag]=0 can only be evaluated when there is a selection that reduces the multiple values of those fields to a single value that can be evaluated.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can check this adding a text box for each field with the expression =registrationNumber_tag or =[Reg. No._tag] and check how it changes with selections.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Without knowing the intention of your expression or the model behind I think the option here is to enclose in an aggr that evaluates the different combinations of values, like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Num(Sum(Aggr((Count((If(MY_AUDI_Vehicle_VIN=VIN,&lt;BR /&gt;(if(registrationNumber_tag=0,registrationNumber,&lt;BR /&gt;if([Reg. No._tag]=0, [Reg. No.]))),&lt;BR /&gt;If(DMS_VIN=VIN,(if(registrationNumber_tag=0,registrationNumber,&lt;BR /&gt;if([Reg. No._tag]=0, [Reg. No.]))))&lt;BR /&gt;))&lt;BR /&gt;),MY_AUDI_Vehicle_VIN,registrationNumber_tag,[Reg. No._tag]))&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2022 11:20:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-and-else-condition-Not-working-without-the-filter/m-p/2017687#M84042</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-12-18T11:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: If and else condition Not working without the filter.</title>
      <link>https://community.qlik.com/t5/App-Development/If-and-else-condition-Not-working-without-the-filter/m-p/2017750#M84049</link>
      <description>&lt;P&gt;Thanku Ruben, I got the issue, it was from the&amp;nbsp; data's end and I tried it using the aggr function it kind of worked but made the dashboard heavier, I resolved it from the backend only. To reduce the data load.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 04:40:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-and-else-condition-Not-working-without-the-filter/m-p/2017750#M84049</guid>
      <dc:creator>deepanshuSh</dc:creator>
      <dc:date>2022-12-19T04:40:16Z</dc:date>
    </item>
  </channel>
</rss>

