<?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: IF CONDITION IN A LABEL in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234933#M392981</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please prepare a small sample which shows your problem, e.g. with scrambled and reduced data.&lt;/P&gt;&lt;P&gt;otherwise it will be hard to assist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Mar 2017 10:24:15 GMT</pubDate>
    <dc:creator>Frank_Hartmann</dc:creator>
    <dc:date>2017-03-19T10:24:15Z</dc:date>
    <item>
      <title>IF CONDITION IN A LABEL</title>
      <link>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234931#M392979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want in an expression label to have different label according to the if condition like the following sample&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; company1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; company2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; company3&lt;/P&gt;&lt;P&gt;17/3/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 18/3/2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17/3/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;20/3/2015&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17/3/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 18/3/2016&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 2.000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.500&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.500&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want in the label to display for the company2 the date 20/3/2015 because I compare the current date with the same date of 2015 and in the other companies I compare with the date of 2016&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;I put the following expression in the label of the expression for the previous period and returns &lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;SPAN style="color: #000000;"&gt;IF(COMPANY_CODE='02',&lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%;"&gt; DATE&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%;"&gt;NUM&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%;"&gt;MAX&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%;"&gt;({1}&lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%;"&gt;DATE_ID_HOURLY&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%;"&gt;))-728),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt;"&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;SPAN style="color: blue; line-height: 115%;"&gt;DATE&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%;"&gt;NUM&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; line-height: 115%;"&gt;MAX&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%;"&gt;({1}&lt;/SPAN&gt;&lt;SPAN style="color: maroon; line-height: 115%;"&gt;DATE_ID_HOURLY&lt;/SPAN&gt;&lt;SPAN style="color: black; line-height: 115%;"&gt;))-364))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Do you have any idea how can I have the results that I want in the label ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Thank you in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Mar 2017 08:05:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234931#M392979</guid>
      <dc:creator>geogou1973</dc:creator>
      <dc:date>2017-03-19T08:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: IF CONDITION IN A LABEL</title>
      <link>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234932#M392980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Please try below expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;SPAN style="color: #000000; font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;IF(COMPANY_CODE='02',&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;DATE&lt;/SPAN&gt;&lt;SPAN style="color: black; font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;MAX&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-style: inherit; font-size: 13.3333px; font-family: inherit; font-weight: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;DATE_ID_HOURLY&lt;/SPAN&gt;&lt;SPAN style="color: black; font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;)-728),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10pt; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: blue;"&gt;DATE&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: blue;"&gt;MAX&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: maroon;"&gt;DATE_ID_HOURLY&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: black;"&gt;)-364))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Mar 2017 08:47:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234932#M392980</guid>
      <dc:creator />
      <dc:date>2017-03-19T08:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: IF CONDITION IN A LABEL</title>
      <link>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234933#M392981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please prepare a small sample which shows your problem, e.g. with scrambled and reduced data.&lt;/P&gt;&lt;P&gt;otherwise it will be hard to assist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Mar 2017 10:24:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234933#M392981</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2017-03-19T10:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: IF CONDITION IN A LABEL</title>
      <link>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234934#M392982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hello Frank&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you see in the following table I have 3 companies in a chart.&lt;/P&gt;&lt;P&gt;In the first expression I calculate the current sales by date and&amp;nbsp; in another expression the same date last year for the companies 1 and 3. In the company 2 I want to bring the sales of 2015 and I display correctly the results with two different variables. I want in the label to have for the company 1 and 3 the date 18/3/2016 and in the label of company 2 the date 20/3/2015. Is there any way to do this meaning to have dynamic label according to the dimension ?&lt;/P&gt;&lt;P&gt;Do the label expression recognize the if condition according to the dimension company ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; company1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; company2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; company3&lt;/P&gt;&lt;P&gt;17/3/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 18/3/2016&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17/3/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;20/3/2015&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17/3/2017&amp;nbsp;&amp;nbsp;&amp;nbsp; 18/3/2016&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 2.000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.500&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.500&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.000&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Mar 2017 10:48:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234934#M392982</guid>
      <dc:creator>geogou1973</dc:creator>
      <dc:date>2017-03-19T10:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: IF CONDITION IN A LABEL</title>
      <link>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234935#M392983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Karan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also used the same condition but it seems that in the label expression does not work the if condition with any field from the tables. I haven't found any other solution in order to have conditionally label.&lt;/P&gt;&lt;P&gt;Any other idea ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Mar 2017 17:31:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234935#M392983</guid>
      <dc:creator>geogou1973</dc:creator>
      <dc:date>2017-03-19T17:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: IF CONDITION IN A LABEL</title>
      <link>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234936#M392984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Geo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please share the sample data in the form of EXCEL/QVD, because for me IF condition is working in label expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 09:00:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-CONDITION-IN-A-LABEL/m-p/1234936#M392984</guid>
      <dc:creator />
      <dc:date>2017-03-20T09:00:32Z</dc:date>
    </item>
  </channel>
</rss>

