<?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 Using Autotcalendar functions to dimension defined as a variable in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-Autotcalendar-functions-to-dimension-defined-as-a-variable/m-p/1561636#M40903</link>
    <description>&lt;P&gt;I have been successfully using the variable extension to cycle through different dimensions as below.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-Enterprise-Documents/Cycle-dimensions-using-a-variable-button-or-dropdown/ta-p/1488404" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Qlik-Sense-Enterprise-Documents/Cycle-dimensions-using-a-variable-button-or-dropdown/ta-p/1488404&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The variable is called $(date_agg) and is pointing to 1 of 4 different columns week_date, month_date,quarter_date,year_date.&lt;/P&gt;&lt;P&gt;I have an expression which has one of the date columns hard coded in(red below).&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;[product]={'original'},[&lt;FONT color="#FF0000"&gt;week_date&lt;/FONT&gt;.autoCalendar.Date] = {"$(=Max([&lt;FONT color="#FF0000"&gt;week_date&lt;/FONT&gt;.autoCalendar.Date],))"}, Month = , Year = , Date = &amp;gt;}metric&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to edit this set analysis to be based on whichever date column the variable is currently set to.&lt;/P&gt;&lt;P&gt;I have tried a few different things eg. just referencing the variable&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;[product]={'original'},[&lt;FONT color="#FF0000"&gt;date_agg&lt;/FONT&gt;.autoCalendar.Date] = {"$(=Max([&lt;FONT color="#FF0000"&gt;date_agg&lt;/FONT&gt;.autoCalendar.Date],))"}, Month = , Year = , Date = &amp;gt;}metric&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;[product]={'original'},[&lt;FONT color="#FF0000"&gt;$(date_agg)&lt;/FONT&gt;.autoCalendar.Date] = {"$(=Max([&lt;FONT color="#FF0000"&gt;$(date_agg)&lt;/FONT&gt;.autoCalendar.Date],))"}, Month = , Year = , Date = &amp;gt;}metric&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried defining a master dimension &lt;FONT color="#0000FF"&gt;date_ag_dim&lt;/FONT&gt; with the expression $(date_agg) and used this dimension in the expression:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;[product]={'original'},[&lt;FONT color="#FF0000"&gt;$&lt;FONT color="#0000FF"&gt;date_ag_dim&lt;/FONT&gt; &lt;/FONT&gt;.autoCalendar.Date] = {"$(=Max([&lt;FONT color="#FF0000"&gt;$&lt;FONT color="#0000FF"&gt;date_ag_dim&lt;/FONT&gt; &lt;/FONT&gt;.autoCalendar.Date],))"}, Month = , Year = , Date = &amp;gt;}metric&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But all three fail.&lt;/P&gt;&lt;P&gt;Wondering if anybody can see where the flaw in my process is?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 06:14:43 GMT</pubDate>
    <dc:creator>paul_gibbons</dc:creator>
    <dc:date>2024-11-16T06:14:43Z</dc:date>
    <item>
      <title>Using Autotcalendar functions to dimension defined as a variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Autotcalendar-functions-to-dimension-defined-as-a-variable/m-p/1561636#M40903</link>
      <description>&lt;P&gt;I have been successfully using the variable extension to cycle through different dimensions as below.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Sense-Enterprise-Documents/Cycle-dimensions-using-a-variable-button-or-dropdown/ta-p/1488404" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/Qlik-Sense-Enterprise-Documents/Cycle-dimensions-using-a-variable-button-or-dropdown/ta-p/1488404&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The variable is called $(date_agg) and is pointing to 1 of 4 different columns week_date, month_date,quarter_date,year_date.&lt;/P&gt;&lt;P&gt;I have an expression which has one of the date columns hard coded in(red below).&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;[product]={'original'},[&lt;FONT color="#FF0000"&gt;week_date&lt;/FONT&gt;.autoCalendar.Date] = {"$(=Max([&lt;FONT color="#FF0000"&gt;week_date&lt;/FONT&gt;.autoCalendar.Date],))"}, Month = , Year = , Date = &amp;gt;}metric&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to edit this set analysis to be based on whichever date column the variable is currently set to.&lt;/P&gt;&lt;P&gt;I have tried a few different things eg. just referencing the variable&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;[product]={'original'},[&lt;FONT color="#FF0000"&gt;date_agg&lt;/FONT&gt;.autoCalendar.Date] = {"$(=Max([&lt;FONT color="#FF0000"&gt;date_agg&lt;/FONT&gt;.autoCalendar.Date],))"}, Month = , Year = , Date = &amp;gt;}metric&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;[product]={'original'},[&lt;FONT color="#FF0000"&gt;$(date_agg)&lt;/FONT&gt;.autoCalendar.Date] = {"$(=Max([&lt;FONT color="#FF0000"&gt;$(date_agg)&lt;/FONT&gt;.autoCalendar.Date],))"}, Month = , Year = , Date = &amp;gt;}metric&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried defining a master dimension &lt;FONT color="#0000FF"&gt;date_ag_dim&lt;/FONT&gt; with the expression $(date_agg) and used this dimension in the expression:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$&amp;lt;[product]={'original'},[&lt;FONT color="#FF0000"&gt;$&lt;FONT color="#0000FF"&gt;date_ag_dim&lt;/FONT&gt; &lt;/FONT&gt;.autoCalendar.Date] = {"$(=Max([&lt;FONT color="#FF0000"&gt;$&lt;FONT color="#0000FF"&gt;date_ag_dim&lt;/FONT&gt; &lt;/FONT&gt;.autoCalendar.Date],))"}, Month = , Year = , Date = &amp;gt;}metric&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;But all three fail.&lt;/P&gt;&lt;P&gt;Wondering if anybody can see where the flaw in my process is?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 06:14:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Autotcalendar-functions-to-dimension-defined-as-a-variable/m-p/1561636#M40903</guid>
      <dc:creator>paul_gibbons</dc:creator>
      <dc:date>2024-11-16T06:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using Autotcalendar functions to dimension defined as a variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Autotcalendar-functions-to-dimension-defined-as-a-variable/m-p/1561644#M40905</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;PRE&gt;Sum({$&amp;lt;[product] = {'original'}, $(='[' &amp;amp; $(date_agg)&amp;amp; '.autoCalendar.Date]') = {"$(=Max($(='[' &amp;amp; $(date_agg)&amp;amp; '.autoCalendar.Date]')))"}, Month = , Year = , Date = &amp;gt;}metric&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Mar 2019 01:24:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Autotcalendar-functions-to-dimension-defined-as-a-variable/m-p/1561644#M40905</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-03-27T01:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using Autotcalendar functions to dimension defined as a variable</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Autotcalendar-functions-to-dimension-defined-as-a-variable/m-p/1564845#M41125</link>
      <description>&lt;P&gt;Unfortunately this solution did not work for me however I did figure it out&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[product] = {'original'}, $(date_agg) = {'$(=$(recent_date))'}&amp;gt;}metric&lt;/P&gt;&lt;P&gt;I defined a variable 'recent_date' as date($(=max($(date_agg),1)))&lt;/P&gt;&lt;P&gt;thanks for setting me in the right direction.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 22:38:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Autotcalendar-functions-to-dimension-defined-as-a-variable/m-p/1564845#M41125</guid>
      <dc:creator>paul_gibbons</dc:creator>
      <dc:date>2019-04-03T22:38:00Z</dc:date>
    </item>
  </channel>
</rss>

