<?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: Syntax to evaluate a variable and show a text depending the value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-is-the-syntax-to-evaluate-a-variable-and-show-a-text/m-p/1943180#M1219441</link>
    <description>&lt;P&gt;Thanks Marcus, the order might have been a problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps for others: this is the solution I have implemented:&lt;/P&gt;
&lt;P&gt;=If ([BMI] &amp;lt; 18.5, 'Text for BMI less than 18.5'&lt;BR /&gt;,If ([BMI] &amp;gt;= 18.5 and [BMI] &amp;lt;25, 'Text for BMI between 18.5 and 25' &lt;BR /&gt;,If ([BMI] &amp;gt;= 25 and [BMI] &amp;lt;30, 'Text for BMI between 25 and 30'&lt;BR /&gt;,If ([BMI] &amp;gt;= 30 and [BMI] &amp;lt;90, 'Text for BMI BMI above 30'&lt;BR /&gt;,''&lt;BR /&gt;))))&lt;/P&gt;
&lt;P&gt;So I leave the ELSE (row 5 in the code above) out and define all possible conditions. If you don't select a single occurence it will then not show the ELSE text (which I did see initially when the whole population had an average BMI of 25.7).&lt;/P&gt;
&lt;P&gt;Also: don't use a ' in the Text area... (Yup made that mistake too and couldn't initially figure out why the expression gave an error. You can solve this by the escape sequence double quote: ''&lt;/P&gt;
&lt;P&gt;Hope this helps someone someday.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2022 07:59:38 GMT</pubDate>
    <dc:creator>MrBosch</dc:creator>
    <dc:date>2022-06-14T07:59:38Z</dc:date>
    <item>
      <title>What is the syntax to evaluate a variable and show a text depending the value in Qlik View</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-the-syntax-to-evaluate-a-variable-and-show-a-text/m-p/1941999#M1219371</link>
      <description>&lt;P&gt;Hello, the infinite pool of mighty wisdom,&lt;/P&gt;
&lt;P&gt;Can anyone give me some tips on how I can make the following happen:&lt;/P&gt;
&lt;P&gt;I am building a report. In the report, a variable needs to be evaluated and the corresponding textual content should be inserted.&lt;/P&gt;
&lt;P&gt;An easy example: is the variable WEIGHT.&lt;/P&gt;
&lt;P&gt;I create a New Text Object and need the variable to be evaluated as follows:&lt;/P&gt;
&lt;P&gt;If WEIGHT is &lt;BR /&gt;&amp;lt; 50 texts should appear: 'You need to gain weight. You can achieve this ...'&lt;BR /&gt;50 - 75 'Great weight. Keep a healthy lifestyle.'&lt;BR /&gt;&amp;gt;75 'You should lose some weight. You could consider ...'.&lt;/P&gt;
&lt;P&gt;Thanks for your help! Highly appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:35:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-the-syntax-to-evaluate-a-variable-and-show-a-text/m-p/1941999#M1219371</guid>
      <dc:creator>MrBosch</dc:creator>
      <dc:date>2022-09-16T09:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to evaluate a variable and show a text depending the value</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-the-syntax-to-evaluate-a-variable-and-show-a-text/m-p/1942164#M1219378</link>
      <description>&lt;P&gt;Maybe something like: if(&lt;SPAN&gt;WEIGHT&amp;nbsp;&amp;lt; 50, 'a', if(WEIGHT&amp;nbsp;&amp;gt; 75, 'c', 'b'))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 11:58:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-the-syntax-to-evaluate-a-variable-and-show-a-text/m-p/1942164#M1219378</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-06-10T11:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to evaluate a variable and show a text depending the value</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-the-syntax-to-evaluate-a-variable-and-show-a-text/m-p/1942242#M1219384</link>
      <description>&lt;P&gt;Thanks Marcus. Great solution. Perhaps one more addition: now the test is &amp;lt;50 A, &amp;gt;75 B and else (between 50-75) C.&lt;/P&gt;
&lt;P&gt;What would be the syntax if someone wants to add more conditions? So... to get 'D'?&lt;/P&gt;
&lt;P&gt;So:&amp;nbsp;&lt;BR /&gt;WEIGHT &amp;lt;25 'A'&lt;BR /&gt;WEIGHT 25-30 'B'&lt;BR /&gt;WEIGHT 30-35 'C'&lt;BR /&gt;WEIGHT &amp;gt;35 'D'&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 13:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-the-syntax-to-evaluate-a-variable-and-show-a-text/m-p/1942242#M1219384</guid>
      <dc:creator>MrBosch</dc:creator>
      <dc:date>2022-06-10T13:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to evaluate a variable and show a text depending the value</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-the-syntax-to-evaluate-a-variable-and-show-a-text/m-p/1942652#M1219409</link>
      <description>&lt;P&gt;In general quite similar - and if the order - ascend or descend - of the check is continuously you don't need to check for between. This means the following should be working:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if(&lt;/SPAN&gt;&lt;SPAN&gt;WEIGHT&amp;nbsp;&amp;lt; 25, 'a', if(WEIGHT&amp;nbsp;&amp;lt; 30, 'b', if(WEIGHT&amp;nbsp;&amp;lt; 35, 'c', 'd')))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 07:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-the-syntax-to-evaluate-a-variable-and-show-a-text/m-p/1942652#M1219409</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-06-13T07:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax to evaluate a variable and show a text depending the value</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-the-syntax-to-evaluate-a-variable-and-show-a-text/m-p/1943180#M1219441</link>
      <description>&lt;P&gt;Thanks Marcus, the order might have been a problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps for others: this is the solution I have implemented:&lt;/P&gt;
&lt;P&gt;=If ([BMI] &amp;lt; 18.5, 'Text for BMI less than 18.5'&lt;BR /&gt;,If ([BMI] &amp;gt;= 18.5 and [BMI] &amp;lt;25, 'Text for BMI between 18.5 and 25' &lt;BR /&gt;,If ([BMI] &amp;gt;= 25 and [BMI] &amp;lt;30, 'Text for BMI between 25 and 30'&lt;BR /&gt;,If ([BMI] &amp;gt;= 30 and [BMI] &amp;lt;90, 'Text for BMI BMI above 30'&lt;BR /&gt;,''&lt;BR /&gt;))))&lt;/P&gt;
&lt;P&gt;So I leave the ELSE (row 5 in the code above) out and define all possible conditions. If you don't select a single occurence it will then not show the ELSE text (which I did see initially when the whole population had an average BMI of 25.7).&lt;/P&gt;
&lt;P&gt;Also: don't use a ' in the Text area... (Yup made that mistake too and couldn't initially figure out why the expression gave an error. You can solve this by the escape sequence double quote: ''&lt;/P&gt;
&lt;P&gt;Hope this helps someone someday.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 07:59:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-the-syntax-to-evaluate-a-variable-and-show-a-text/m-p/1943180#M1219441</guid>
      <dc:creator>MrBosch</dc:creator>
      <dc:date>2022-06-14T07:59:38Z</dc:date>
    </item>
  </channel>
</rss>

