<?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 Problem with Dynamic Data Labels in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-Dynamic-Data-Labels/m-p/71990#M771682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart that I want to display certain Quarter periods back based upon the user's selection of the Quarter field. So, for example, if the user selected 2016 Q3, Column1 would display the current quarter (i.e., "2016 Q3"), and Column2 would display 1 quarter prior ("2016 Q2"), Column3 would display 2 quarters prior ("2016 Q1") and so forth. My question is what expression to write in the labels input box to get it to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quarter is string/text values, which complicates matters. If it's values were numeric (like Year), I would simply use the Max or &lt;EM&gt;GetFieldSelections&lt;/EM&gt; functions (e.g., to get 2 years back, I would use either =&lt;EM&gt;Max&lt;/EM&gt;(Year)-2 or =&lt;EM&gt;GetFieldSelections&lt;/EM&gt;(Year)-2). I thought of using the &lt;EM&gt;MaxString&lt;/EM&gt; function, but it doesn't have the optional rank/offset function (like Max does), so it won't work for my purposes. I read in another post about &lt;EM&gt;Above&lt;/EM&gt; (and &lt;EM&gt;Above&lt;/EM&gt; TOTAL), and attempted combining it with the other functions mentioned earlier, but I couldn't get it to work properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried creating an index of the Quarter field, essentially by loading its distinct values into a new table, sorting them, and creating an index (see the script below). My thought was that I could use that index to point to the relevant Quarter value, either in an IF statement or a set expression.&amp;nbsp; (e.g., first creating a variable representing 1 quarter prior [v1Qprior = Qkey-1], then in the chart label using an expression like "if(Qkey=v1Qprior),Quarter"), but I haven't gotten that to work either. Perhaps I'm using the wrong syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm stuck. Any advice or suggestions you can give would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; QuarterTable:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quarter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AutoNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quarter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;QKey&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; FactSource&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;By&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quarter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;asc&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>jchambers123</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Problem with Dynamic Data Labels</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Dynamic-Data-Labels/m-p/71990#M771682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart that I want to display certain Quarter periods back based upon the user's selection of the Quarter field. So, for example, if the user selected 2016 Q3, Column1 would display the current quarter (i.e., "2016 Q3"), and Column2 would display 1 quarter prior ("2016 Q2"), Column3 would display 2 quarters prior ("2016 Q1") and so forth. My question is what expression to write in the labels input box to get it to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quarter is string/text values, which complicates matters. If it's values were numeric (like Year), I would simply use the Max or &lt;EM&gt;GetFieldSelections&lt;/EM&gt; functions (e.g., to get 2 years back, I would use either =&lt;EM&gt;Max&lt;/EM&gt;(Year)-2 or =&lt;EM&gt;GetFieldSelections&lt;/EM&gt;(Year)-2). I thought of using the &lt;EM&gt;MaxString&lt;/EM&gt; function, but it doesn't have the optional rank/offset function (like Max does), so it won't work for my purposes. I read in another post about &lt;EM&gt;Above&lt;/EM&gt; (and &lt;EM&gt;Above&lt;/EM&gt; TOTAL), and attempted combining it with the other functions mentioned earlier, but I couldn't get it to work properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried creating an index of the Quarter field, essentially by loading its distinct values into a new table, sorting them, and creating an index (see the script below). My thought was that I could use that index to point to the relevant Quarter value, either in an IF statement or a set expression.&amp;nbsp; (e.g., first creating a variable representing 1 quarter prior [v1Qprior = Qkey-1], then in the chart label using an expression like "if(Qkey=v1Qprior),Quarter"), but I haven't gotten that to work either. Perhaps I'm using the wrong syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm stuck. Any advice or suggestions you can give would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; QuarterTable:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Distinct&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quarter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AutoNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quarter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;QKey&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; FactSource&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Order&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;By&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Quarter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;asc&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Dynamic-Data-Labels/m-p/71990#M771682</guid>
      <dc:creator>jchambers123</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Dynamic Data Labels</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Dynamic-Data-Labels/m-p/71991#M771687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;maybe sometyhing like that&lt;/P&gt;&lt;P&gt;use fieldindex() to determine the row number&amp;nbsp; of the quarter&lt;/P&gt;&lt;P&gt;and with peek(fieldindex()) -1, you get the previous value&lt;/P&gt;&lt;P&gt;and wioth peek(fieldindex())-2, the previous one&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2018 14:15:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Dynamic-Data-Labels/m-p/71991#M771687</guid>
      <dc:creator>olivierrobin</dc:creator>
      <dc:date>2018-05-22T14:15:22Z</dc:date>
    </item>
  </channel>
</rss>

