<?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 If RowNo with variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024731#M346440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a straight table in my application with a drill down group dimension.&amp;nbsp; I have mapped in target values using a mapping load to my data set based on each of the dimensions in the group.&amp;nbsp; I then have a variable that grabs the target value associated with whatever dimension is drilled in to.&amp;nbsp; However, during the mapping load the Total targets don't come in since there is no "Total" in my dimension. I still need to display the total target on the total line so I am trying to use an IF statement to bring in the static total target if the row is 0&amp;nbsp; but I'm getting an error.&lt;/P&gt;&lt;P&gt;The variable works fine on its own in the expression but once I add the "If" it errors out saying its expecting a ')'.&amp;nbsp; On the flip side if I use the If without the variable it also works fine.&amp;nbsp; What am I missing??&lt;/P&gt;&lt;P&gt;The If I'm using is:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =If(RowNo()=0, .87, $(vChgTarg_Org))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Apr 2016 15:27:34 GMT</pubDate>
    <dc:creator>alanmcgrath</dc:creator>
    <dc:date>2016-04-26T15:27:34Z</dc:date>
    <item>
      <title>If RowNo with variable</title>
      <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024731#M346440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a straight table in my application with a drill down group dimension.&amp;nbsp; I have mapped in target values using a mapping load to my data set based on each of the dimensions in the group.&amp;nbsp; I then have a variable that grabs the target value associated with whatever dimension is drilled in to.&amp;nbsp; However, during the mapping load the Total targets don't come in since there is no "Total" in my dimension. I still need to display the total target on the total line so I am trying to use an IF statement to bring in the static total target if the row is 0&amp;nbsp; but I'm getting an error.&lt;/P&gt;&lt;P&gt;The variable works fine on its own in the expression but once I add the "If" it errors out saying its expecting a ')'.&amp;nbsp; On the flip side if I use the If without the variable it also works fine.&amp;nbsp; What am I missing??&lt;/P&gt;&lt;P&gt;The If I'm using is:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =If(RowNo()=0, .87, $(vChgTarg_Org))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 15:27:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024731#M346440</guid>
      <dc:creator>alanmcgrath</dc:creator>
      <dc:date>2016-04-26T15:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: If RowNo with variable</title>
      <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024732#M346441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And what is the &lt;EM&gt;exact&lt;/EM&gt; definition of that variable? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 17:03:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024732#M346441</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-26T17:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: If RowNo with variable</title>
      <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024733#M346442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=If(GetSelectedCount(OrgUnit1) &amp;gt;0 and GetSelectedCount(OrgUnit2)&amp;gt;0, ChgOrg3, If(GetSelectedCount(OrgUnit1)&amp;gt;0,ChgOrg2, If(GetSelectedCount(OrgUnit1)=0,ChgOrg1,'')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dimension group contains OrgUnit1, OrgUnit2, OrgUnit3, OrgUnit4 and so on, up to OrgUnit10.&amp;nbsp; the ChgOrg# is the target associated with that level in the dimension. So ChgOrg3 will match up with OrgUnit3, ChgOrg2 will match up with OrgUnit2, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This variable works fine in the expression but I obviously get a blank/Null on the total row.&amp;nbsp; I want .87 to come in on the total row, but the If(RowNo expression doesn't seem to be working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 17:10:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024733#M346442</guid>
      <dc:creator>alanmcgrath</dc:creator>
      <dc:date>2016-04-26T17:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: If RowNo with variable</title>
      <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024734#M346443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Dimensionality()=0, ...., ...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 17:16:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024734#M346443</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-26T17:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: If RowNo with variable</title>
      <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024735#M346444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still get the same error - expecting ')' . but in the expression window is shows as expression ok.&amp;nbsp; I guess it doesn't like the variable combined with the If. seems odd to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 17:30:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024735#M346444</guid>
      <dc:creator>alanmcgrath</dc:creator>
      <dc:date>2016-04-26T17:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: If RowNo with variable</title>
      <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024736#M346445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the variable maybe expand to an expression including the leading equal sign?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 17:40:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024736#M346445</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-26T17:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: If RowNo with variable</title>
      <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024737#M346446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will show the text of the expression of the variable in the straight table if I remove the dollar expansion from the variable in the straight table's expression or if I remove the leading = from the variable definition.&amp;nbsp; Otherwise the whole straight table shows blank with that error message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 17:50:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024737#M346446</guid>
      <dc:creator>alanmcgrath</dc:creator>
      <dc:date>2016-04-26T17:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: If RowNo with variable</title>
      <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024738#M346447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe your issue (with the error message) is caused by the way you've defined your variable and how you call the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3406"&gt;The Magic of Variables&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you maybe post a small sample QVW to get a better view of your setting?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2016 18:10:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024738#M346447</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-26T18:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: If RowNo with variable</title>
      <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024739#M346448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added a sample QVW to the original message.&amp;nbsp; The column "Chg Tgt" is where I'm using the expression.&amp;nbsp; the table on the left shows that column working when I use just the variable and the column on the right shows it not working when I add the If(RowNo statement.&amp;nbsp; I need to get .87 into the total line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 12:41:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024739#M346448</guid>
      <dc:creator>alanmcgrath</dc:creator>
      <dc:date>2016-04-27T12:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: If RowNo with variable</title>
      <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024740#M346449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 15:51:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024740#M346449</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-27T15:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: If RowNo with variable</title>
      <link>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024741#M346450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes that works perfectly.&amp;nbsp; I never would have thought to use single quotes on the field in the variable.&lt;/P&gt;&lt;P&gt;Thanks!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 16:34:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-RowNo-with-variable/m-p/1024741#M346450</guid>
      <dc:creator>alanmcgrath</dc:creator>
      <dc:date>2016-04-27T16:34:16Z</dc:date>
    </item>
  </channel>
</rss>

