<?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 variable for quarter in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/variable-for-quarter-in-set-analysis/m-p/1724574#M722174</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a master calendar and i have a time dimenson called Quarter-Year which has value such as&lt;/P&gt;&lt;P&gt;'T1-2019', 'T2-2019' and so on....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thing is i want to use a variable to compare let's say a value at T1-2020 to T1-2019.&lt;/P&gt;&lt;P&gt;Usually for year i use a variable so let's say vCurrentYear = max(year(DATE_Field)) and vPreviousYear =&amp;nbsp;max(year(DATE_Field)-1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a specific example which is :&lt;/P&gt;&lt;P&gt;if (Quarter-Year = 'Q1-2019',SUM({&amp;lt;CAT_CONTRAT = {'CDI'},[Quarter-Year] = {'Q1-2019'}&amp;gt;}ABS_DIR_JRS_OUV)/SUM({&amp;lt;CAT_CONTRAT = {'CDI'},[Quarter-Year] = {'Q1-2019'}&amp;gt;}NB_JRS_THEO_TRAVAIL),&lt;/P&gt;&lt;P&gt;if (Quarter-Year = 'Q1-2020,SUM({&amp;lt;CAT_CONTRAT = {'CDI'},[Quarter-Year] = {'Q1-2020'}&amp;gt;}ABS_DIR_JRS_OUV)/SUM({&amp;lt;CAT_CONTRAT = {'CDI'},[Quarter-Year] = {'Q1-2020'}&amp;gt;}NB_JRS_THEO_TRAVAIL),))&lt;/P&gt;&lt;P&gt;The result will be ok but i want to compare Quarter Year N to Quarter PreviousYear&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DO you know how i could do that ?&lt;/P&gt;&lt;P&gt;Thank you a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my master calendar the "quarter year" is this one:&amp;nbsp;'T' &amp;amp; ceil(Month(TempDate)/3)&amp;amp;'-'&amp;amp; Right(Year(TempDate),2) as QuarterYear,&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 00:22:55 GMT</pubDate>
    <dc:creator>lessassy</dc:creator>
    <dc:date>2024-11-16T00:22:55Z</dc:date>
    <item>
      <title>variable for quarter in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-for-quarter-in-set-analysis/m-p/1724574#M722174</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a master calendar and i have a time dimenson called Quarter-Year which has value such as&lt;/P&gt;&lt;P&gt;'T1-2019', 'T2-2019' and so on....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The thing is i want to use a variable to compare let's say a value at T1-2020 to T1-2019.&lt;/P&gt;&lt;P&gt;Usually for year i use a variable so let's say vCurrentYear = max(year(DATE_Field)) and vPreviousYear =&amp;nbsp;max(year(DATE_Field)-1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a specific example which is :&lt;/P&gt;&lt;P&gt;if (Quarter-Year = 'Q1-2019',SUM({&amp;lt;CAT_CONTRAT = {'CDI'},[Quarter-Year] = {'Q1-2019'}&amp;gt;}ABS_DIR_JRS_OUV)/SUM({&amp;lt;CAT_CONTRAT = {'CDI'},[Quarter-Year] = {'Q1-2019'}&amp;gt;}NB_JRS_THEO_TRAVAIL),&lt;/P&gt;&lt;P&gt;if (Quarter-Year = 'Q1-2020,SUM({&amp;lt;CAT_CONTRAT = {'CDI'},[Quarter-Year] = {'Q1-2020'}&amp;gt;}ABS_DIR_JRS_OUV)/SUM({&amp;lt;CAT_CONTRAT = {'CDI'},[Quarter-Year] = {'Q1-2020'}&amp;gt;}NB_JRS_THEO_TRAVAIL),))&lt;/P&gt;&lt;P&gt;The result will be ok but i want to compare Quarter Year N to Quarter PreviousYear&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DO you know how i could do that ?&lt;/P&gt;&lt;P&gt;Thank you a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my master calendar the "quarter year" is this one:&amp;nbsp;'T' &amp;amp; ceil(Month(TempDate)/3)&amp;amp;'-'&amp;amp; Right(Year(TempDate),2) as QuarterYear,&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:22:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-for-quarter-in-set-analysis/m-p/1724574#M722174</guid>
      <dc:creator>lessassy</dc:creator>
      <dc:date>2024-11-16T00:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: variable for quarter in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-for-quarter-in-set-analysis/m-p/1725230#M722175</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;you may be try this&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DATE= {"&amp;gt;=$(=quarterstart(min(DATE),-4))&amp;lt;$(=quarterstart(min(DATE),-3))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.qlik.com/t5/QlikView-Layout-Visualizations/How-compare-two-quarter-in-different-years/m-p/253983" target="_blank"&gt;https://community.qlik.com/t5/QlikView-Layout-Visualizations/How-compare-two-quarter-in-different-years/m-p/253983&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;raji&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 08:23:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-for-quarter-in-set-analysis/m-p/1725230#M722175</guid>
      <dc:creator>raji6763</dc:creator>
      <dc:date>2020-07-06T08:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: variable for quarter in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-for-quarter-in-set-analysis/m-p/1725747#M722176</link>
      <description>&lt;P&gt;it worked thank you.&lt;/P&gt;&lt;P&gt;I tried also instead of&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Quarter-Year = 'Q1-2019' i put&amp;nbsp;Quarter-Year = 'Q1-'&amp;amp;'$(=vCurrentYear) or Previous Year and it work pretty well too.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyway thanks for the tips&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 14:41:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-for-quarter-in-set-analysis/m-p/1725747#M722176</guid>
      <dc:creator>lessassy</dc:creator>
      <dc:date>2020-07-07T14:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: variable for quarter in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/variable-for-quarter-in-set-analysis/m-p/1725939#M722177</link>
      <description>&lt;P&gt;if you got solution.please close this thread.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 05:53:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/variable-for-quarter-in-set-analysis/m-p/1725939#M722177</guid>
      <dc:creator>raji6763</dc:creator>
      <dc:date>2020-07-08T05:53:23Z</dc:date>
    </item>
  </channel>
</rss>

