<?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: Using an expression to point to a fieldname in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743029#M1035877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it's true..sorry!&lt;/P&gt;&lt;P&gt;Can you attach a sample qvw?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jan 2015 13:30:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-07T13:30:28Z</dc:date>
    <item>
      <title>Using an expression to point to a fieldname</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743026#M1035874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best wished for 2015 and a lot of Qlikview fun!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question for today:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with my customers and I created following fields:&lt;/P&gt;&lt;P&gt;R2012&lt;/P&gt;&lt;P&gt;R2013&lt;/P&gt;&lt;P&gt;R2014&lt;/P&gt;&lt;P&gt;R2015&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm now building a table with an aggr function, and the dimension to be used in the aggr function is one of the above fields, depending in the value of the function " max(year) ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Say, the highest selected year is 2014, then the aggr funtion should use the field "R2014" as dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a variable, and when I display it in a textbox, it shows R2014 or any other value, depening on what year I selected.&lt;/P&gt;&lt;P&gt;But if I use that variable in de place where I now 'hardcoded' typed 'R2014', my expression doens't give a result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be complete:&lt;/P&gt;&lt;P&gt;the function is: -sum(aggr(rangesum(top(sum({$&amp;lt;Jaar={$(=max(Jaar))}&amp;gt;}Omzet),1,rowno()-1))/rangesum(top(sum({$&amp;lt;Jaar={$(=max(Jaar))}&amp;gt;}Omzet),1,noofrows())),R2014)&amp;lt;0.50)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field R2014 contains per customer their rank for 2014 based on turnover. So whit that expression, I want to find how many customers where needed to reach 50% turnover. It all works, but I want to make it more flexible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone who knows how to solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yves&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 15:12:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743026#M1035874</guid>
      <dc:creator />
      <dc:date>2015-01-06T15:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using an expression to point to a fieldname</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743027#M1035875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;you can write 4 functions, as the one you wrote above, one for each of the 4 fields and then use "Enable Conditional" to choose which of the 4 dimensions to use.&lt;/P&gt;&lt;P&gt;You can write GetFieldSelections(Year)=2014 in order to use R2014 and so on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jan 2015 19:19:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743027#M1035875</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-06T19:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using an expression to point to a fieldname</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743028#M1035876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think that is a solution, because in 2 year, i will have fields names R2016 and R2017, and R2012 and R2013 will no longer exist.&lt;/P&gt;&lt;P&gt;I need to have a formule that will still work in 2017. This can only be achieved if I can make that fieldname in de expression into a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution can work if instead of making the filednames variable, I make then fixed like R1 for the max year, R2 for year-1 and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yves&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 10:07:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743028#M1035876</guid>
      <dc:creator />
      <dc:date>2015-01-07T10:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using an expression to point to a fieldname</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743029#M1035877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it's true..sorry!&lt;/P&gt;&lt;P&gt;Can you attach a sample qvw?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 13:30:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743029#M1035877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-07T13:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using an expression to point to a fieldname</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743030#M1035878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made a work around to this. Your comment about the "enable conditional" pointed me to this.&lt;/P&gt;&lt;P&gt;I changed the field names to R1 for the current year, R2 for previous year, ... .&lt;/P&gt;&lt;P&gt;Then I duplicated my chart as many times as i had years using R1, R2, ... in the expression and then put a conditional show on the chart depending on the selected year ( max(ALL year) - max(year) = 0 for the R1 version, max(ALL year) - max(year) = 1 for the R2 version and so on.&lt;/P&gt;&lt;P&gt;This also works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I have to change anything to the chart later on, I'll have to remeber that it is not 1 chart for all the years, but that these are different chart with a conditional show. I'll put in a text box with a conditional show that only shows when I open to fill with a text to remind me of this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the pointer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you can't resist: I attached a sample file. there is some Dutch in there, but on the left with the green background is a table that shows the result I want for the year 2014, if that year is selected and R2014 (fieldname) is hardcoded in the expression.&lt;/P&gt;&lt;P&gt;With the red background is a copy of the table, but R2014 replaced by a variable, which contains the value 'R2014' but doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yves&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 14:28:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743030#M1035878</guid>
      <dc:creator />
      <dc:date>2015-01-07T14:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using an expression to point to a fieldname</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743031#M1035879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a new variable Q2 and the red object seems to work... I think there is a problem with variables' definitions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KR&lt;/P&gt;&lt;P&gt;Elena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 14:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743031#M1035879</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-07T14:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using an expression to point to a fieldname</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743032#M1035880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand this.&lt;/P&gt;&lt;P&gt;What you did works!&lt;/P&gt;&lt;P&gt;I'm almost sure I tried the thing you did, but then again, I wouldn't have posted this question if I really had. It must be the one option I overlooked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yves&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 15:54:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-to-point-to-a-fieldname/m-p/743032#M1035880</guid>
      <dc:creator />
      <dc:date>2015-01-07T15:54:43Z</dc:date>
    </item>
  </channel>
</rss>

