<?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: expression referring to columnlabels and expressions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/expression-referring-to-columnlabels-and-expressions/m-p/2163981#M94516</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/48508"&gt;@curiousfellow&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it is possible&lt;/P&gt;
&lt;P&gt;only error i see is that your are missing a braket (highlighted in red)&lt;/P&gt;
&lt;PRE&gt;If (linenumber = 110,&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;[&lt;/FONT&gt;&lt;/STRONG&gt;column1]-[column2],&lt;BR /&gt;&lt;BR /&gt;if (linenumber = 220, expression with variables))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;also i guess you have&amp;nbsp;&lt;SPAN&gt;column1,&amp;nbsp;column2 and&amp;nbsp;column3 as &lt;U&gt;master measures&lt;/U&gt; and you could have problems because of data model or aggregation level on each measure.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;remember that you can use the values of the columns by simply calling them within the same object using &lt;STRONG&gt;column(number)&lt;/STRONG&gt;, this will only considere measure columns and not dimensions columns.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RafaelBarrios_0-1705940075633.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127559i3DC97F3B0931CEEB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RafaelBarrios_0-1705940075633.png" alt="RafaelBarrios_0-1705940075633.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my third column measure is:&lt;/P&gt;
&lt;PRE&gt;if(Date&amp;gt;=makedate(2023,11,01),column(1)-column(2),&lt;BR /&gt;if(Date&amp;lt;makedate(2023,11,01),column(2)))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;help users find answers! Don't forget to&amp;nbsp;&lt;FONT color="#993366"&gt;mark a solution&lt;/FONT&gt;&amp;nbsp;that worked for you &amp;amp; to smash the&lt;FONT color="#339966"&gt;&amp;nbsp;like&lt;/FONT&gt;&amp;nbsp;button!&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jan 2024 16:17:08 GMT</pubDate>
    <dc:creator>RafaelBarrios</dc:creator>
    <dc:date>2024-01-22T16:17:08Z</dc:date>
    <item>
      <title>expression referring to columnlabels and expressions</title>
      <link>https://community.qlik.com/t5/App-Development/expression-referring-to-columnlabels-and-expressions/m-p/2163973#M94515</link>
      <description>&lt;P&gt;I have a chart containing dimension:linenumber and&lt;/P&gt;
&lt;P&gt;two columns labeled column1 and column2&lt;/P&gt;
&lt;P&gt;I want to add a third column containing the difference between column1 and column2 OR an expression&lt;BR /&gt;&lt;BR /&gt;My expression for column3 = if(linenumber = 110, [column1]-[column2]) this works fine.&lt;/P&gt;
&lt;P&gt;Another expression for column3 is : if(linenumber = 220, expression with variables) this works fine too&lt;/P&gt;
&lt;P&gt;But when I want to merge this two expressions into one expression I get an error and one of the "(" turns red&lt;/P&gt;
&lt;P&gt;My new expression is like this:&lt;/P&gt;
&lt;P&gt;If (linenumber = 110,column1]-[column2],&lt;/P&gt;
&lt;P&gt;if (linenumber = 220, expression with variables))&lt;/P&gt;
&lt;P&gt;Is it not possible to use both ways of calculation in one formula, and if not, is there an alternative not using complete formula's ?&lt;/P&gt;
&lt;P&gt;I am using Qlikview May 2021 SR1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 15:53:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/expression-referring-to-columnlabels-and-expressions/m-p/2163973#M94515</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2024-01-22T15:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: expression referring to columnlabels and expressions</title>
      <link>https://community.qlik.com/t5/App-Development/expression-referring-to-columnlabels-and-expressions/m-p/2163981#M94516</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/48508"&gt;@curiousfellow&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it is possible&lt;/P&gt;
&lt;P&gt;only error i see is that your are missing a braket (highlighted in red)&lt;/P&gt;
&lt;PRE&gt;If (linenumber = 110,&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;[&lt;/FONT&gt;&lt;/STRONG&gt;column1]-[column2],&lt;BR /&gt;&lt;BR /&gt;if (linenumber = 220, expression with variables))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;also i guess you have&amp;nbsp;&lt;SPAN&gt;column1,&amp;nbsp;column2 and&amp;nbsp;column3 as &lt;U&gt;master measures&lt;/U&gt; and you could have problems because of data model or aggregation level on each measure.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;remember that you can use the values of the columns by simply calling them within the same object using &lt;STRONG&gt;column(number)&lt;/STRONG&gt;, this will only considere measure columns and not dimensions columns.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RafaelBarrios_0-1705940075633.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127559i3DC97F3B0931CEEB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RafaelBarrios_0-1705940075633.png" alt="RafaelBarrios_0-1705940075633.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my third column measure is:&lt;/P&gt;
&lt;PRE&gt;if(Date&amp;gt;=makedate(2023,11,01),column(1)-column(2),&lt;BR /&gt;if(Date&amp;lt;makedate(2023,11,01),column(2)))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;help users find answers! Don't forget to&amp;nbsp;&lt;FONT color="#993366"&gt;mark a solution&lt;/FONT&gt;&amp;nbsp;that worked for you &amp;amp; to smash the&lt;FONT color="#339966"&gt;&amp;nbsp;like&lt;/FONT&gt;&amp;nbsp;button!&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 16:17:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/expression-referring-to-columnlabels-and-expressions/m-p/2163981#M94516</guid>
      <dc:creator>RafaelBarrios</dc:creator>
      <dc:date>2024-01-22T16:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: expression referring to columnlabels and expressions</title>
      <link>https://community.qlik.com/t5/App-Development/expression-referring-to-columnlabels-and-expressions/m-p/2164178#M94536</link>
      <description>&lt;P&gt;Thank you very much, the bracket was a typo, but using column(number) did the trick.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 07:02:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/expression-referring-to-columnlabels-and-expressions/m-p/2164178#M94536</guid>
      <dc:creator>curiousfellow</dc:creator>
      <dc:date>2024-01-23T07:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: expression referring to columnlabels and expressions</title>
      <link>https://community.qlik.com/t5/App-Development/expression-referring-to-columnlabels-and-expressions/m-p/2164351#M94567</link>
      <description>&lt;P&gt;Great&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/48508"&gt;@curiousfellow&lt;/a&gt;&amp;nbsp;!!!&lt;/P&gt;
&lt;P&gt;im glad it works for you...&lt;/P&gt;
&lt;P&gt;Keep in mind that this solution has an important "BUT", and that is that users can reorder the columns and this can cause the table to fail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 11:50:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/expression-referring-to-columnlabels-and-expressions/m-p/2164351#M94567</guid>
      <dc:creator>RafaelBarrios</dc:creator>
      <dc:date>2024-01-23T11:50:41Z</dc:date>
    </item>
  </channel>
</rss>

