<?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: Create a calculated dimension based on multiple If statements in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Create-a-calculated-dimension-based-on-multiple-If-statements/m-p/1865013#M71397</link>
    <description>&lt;P&gt;Start by whittling it down to just one if() statement and see if that works. If it doesn't, check the syntax at the bottom of the expression editor to see if your variables are getting parsed as you expect, which would be the most likely culprit in this scenario. I also think you want to be using single quotes rather than double quotes for the strings you return.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Nov 2021 15:49:44 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2021-11-30T15:49:44Z</dc:date>
    <item>
      <title>Create a calculated dimension based on multiple If statements</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-calculated-dimension-based-on-multiple-If-statements/m-p/1865006#M71396</link>
      <description>&lt;P&gt;I am trying to create a calculated dimension based on about seven different variables, and I believe the way that I need to do this is to string together multiple If Statements, one for each of the possible outputs that I need.&amp;nbsp; I have to do this 29 times, but I stopped after four IF statements to check my code and I can't figure out the error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code:&lt;/P&gt;
&lt;P&gt;IF ([Variable 1] = 'X1' AND Variable2= 'Z1' AND [Variable 3] &amp;lt; 12, "X1|Z1|&amp;lt;12",&lt;/P&gt;
&lt;P&gt;IF ([Variable 1] = 'X2' AND Variable2= 'Z1' AND [Variable 3] &amp;gt;= 12, "X2|Z1|&amp;gt;=12",&lt;/P&gt;
&lt;P&gt;IF ([Variable 1] = 'X1' AND Variable2= 'Z2' AND [Variable 3] &amp;gt;= 12, "X1|Z2|&amp;gt;=12",&lt;/P&gt;
&lt;P&gt;IF ([Variable 1] = 'X2' AND Variable2= 'Z2' AND [Variable 3] &amp;lt; 12, "X1|Z2|&amp;lt;12",&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;"Other"))))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I believe should happen is if Variable 1 = X1, Variable 2 = Z1, and Variable 3 &amp;lt;12, then the dimension should return&amp;nbsp;"X1|Z1|&amp;lt;12".&amp;nbsp; If none of those happen, it should go to the next statement, on to the end, and if none of them are returned, it should return "Other".&amp;nbsp; However, all it says is "Error in Expression" and no more detail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 15:37:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-calculated-dimension-based-on-multiple-If-statements/m-p/1865006#M71396</guid>
      <dc:creator>spjuza</dc:creator>
      <dc:date>2021-11-30T15:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create a calculated dimension based on multiple If statements</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-calculated-dimension-based-on-multiple-If-statements/m-p/1865013#M71397</link>
      <description>&lt;P&gt;Start by whittling it down to just one if() statement and see if that works. If it doesn't, check the syntax at the bottom of the expression editor to see if your variables are getting parsed as you expect, which would be the most likely culprit in this scenario. I also think you want to be using single quotes rather than double quotes for the strings you return.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 15:49:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-calculated-dimension-based-on-multiple-If-statements/m-p/1865013#M71397</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-11-30T15:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create a calculated dimension based on multiple If statements</title>
      <link>https://community.qlik.com/t5/App-Development/Create-a-calculated-dimension-based-on-multiple-If-statements/m-p/1865018#M71398</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp; It was the double quotes that was causing the error. Otherwise everything worked.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 15:56:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Create-a-calculated-dimension-based-on-multiple-If-statements/m-p/1865018#M71398</guid>
      <dc:creator>spjuza</dc:creator>
      <dc:date>2021-11-30T15:56:00Z</dc:date>
    </item>
  </channel>
</rss>

