<?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: Help with nested IFs in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33597#M2242</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check here&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-16454"&gt;Uploading a Sample&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2018 13:07:48 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-03-15T13:07:48Z</dc:date>
    <item>
      <title>Help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33594#M2239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;My nested IF statemement looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if(type='STATISTIKK',Sum({$&amp;lt;År={$(=yearfrom)}&amp;gt;}[Folkemengde_31.12_stat]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if(type='TILBUD',Sum({$&amp;lt;År={$(=baseyear-1)}&amp;gt;}Folkemengde_3112),&lt;/P&gt;&lt;P&gt;if(type='FRAMSKRIVNING',Sum({$&amp;lt;År={$(=baseyear-1)}&amp;gt;}Folkemengde_3112),&lt;/P&gt;&lt;P&gt;if(type='TRENDFLYTTING',Sum({$&amp;lt;År={$(=baseyear-1)}&amp;gt;}Folkemengde_3112),&lt;/P&gt;&lt;P&gt;'-'))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The strange thing i that the first line does not return any results. The other if lines work like a charm.&lt;/P&gt;&lt;P&gt;But if I reduce the formula, like this:&lt;/P&gt;&lt;P&gt;if(type='STATISTIKK',Sum({$&amp;lt;År={$(=yearfrom)}&amp;gt;}[Folkemengde_31.12_stat]),&lt;/P&gt;&lt;P&gt;'-')&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;it works perfectly. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I cannot figure out why this happens. Any help would be welcome.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 12:16:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33594#M2239</guid>
      <dc:creator>jelindbe</dc:creator>
      <dc:date>2018-03-15T12:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33595#M2240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample or sample data... because the expression itself seem to be okay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 12:24:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33595#M2240</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-03-15T12:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33596#M2241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I could send you the app. By email or uploading...(how)..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 13:01:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33596#M2241</guid>
      <dc:creator>jelindbe</dc:creator>
      <dc:date>2018-03-15T13:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33597#M2242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check here&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-16454"&gt;Uploading a Sample&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 13:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33597#M2242</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-03-15T13:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33598#M2243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The attachment was too big. I give you access to the app via dropbox instead. Here you are - &lt;A href="https://www.dropbox.com/s/typ9oiv4xgd0q78/KOMPAS-PROSJEKTER2.qvf?dl=0" title="https://www.dropbox.com/s/typ9oiv4xgd0q78/KOMPAS-PROSJEKTER2.qvf?dl=0"&gt;Dropbox - KOMPAS-PROSJEKTER2.qvf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Move to the Sheet "Folkemengde-endring". You will find a bar chart and kpi's. They will be populated if you choose from "Prosjekt" in the filter pane. "Moss og Rygge" is a "type=TILBUD" project while "Statistikk Moss og Rygge" is a "type=STATISTIKK". You will see that the first one works fine (showing green and red values in the chart) but the second one does not show correct values (showing only red, no green values). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Under "Measures" you will find "Folkemengde i basisår" which is used in this sheet (for the green values). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 14:35:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33598#M2243</guid>
      <dc:creator>jelindbe</dc:creator>
      <dc:date>2018-03-15T14:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33599#M2244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, I won't be able to download this... may be someone with access to Dropbox can check or I will check this once I am home&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 14:37:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33599#M2244</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-03-15T14:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33600#M2245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why, but adding double quotes around your dollar sign expansion seems to have worked&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;if(type = 'STATISTIKK', Sum({$&amp;lt;År={"$(=yearfrom)"}&amp;gt;}[Folkemengde_31.12_stat]),&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;if(type = 'TILBUD', Sum({$&amp;lt;År={"$(=baseyear-1)"}&amp;gt;}Folkemengde_3112),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;if(type = 'FRAMSKRIVNING', Sum({$&amp;lt;År={"$(=baseyear-1)"}&amp;gt;}Folkemengde_3112),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;if(type = 'TRENDFLYTTING', Sum({$&amp;lt;År={"$(=baseyear-1)"}&amp;gt;}Folkemengde_3112), '-'))))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another way to write this if statement is to use Pick(Match(...))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pick(Match(type, 'STATISTIKK', 'TILBUD', 'FRAMSKRIVNING', 'TRENDFLYTTING')+1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;'-',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;År={"$(=yearfrom)"}&amp;gt;}[Folkemengde_31.12_stat]),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;År={"$(=baseyear-1)"}&amp;gt;}Folkemengde_3112),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;År={"$(=baseyear-1)"}&amp;gt;}Folkemengde_3112),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;År={"$(=baseyear-1)"}&amp;gt;}Folkemengde_3112))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 21:29:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33600#M2245</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-03-15T21:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help with nested IFs</title>
      <link>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33601#M2246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much! You have no idea how I have struggled with this - back and forth, up and down, in and out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both your statements worked out of the box. Your alternative statement seems much more elegant and easier to maintain. I must study Pick and Match.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 07:37:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Help-with-nested-IFs/m-p/33601#M2246</guid>
      <dc:creator>jelindbe</dc:creator>
      <dc:date>2018-03-16T07:37:27Z</dc:date>
    </item>
  </channel>
</rss>

