<?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: Comparaison Year/(Year -1) using selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparaison-Year-Year-1-using-selection/m-p/1544444#M745144</link>
    <description>&lt;P&gt;What expression did you use for Y?&lt;/P&gt;</description>
    <pubDate>Thu, 14 Feb 2019 15:07:12 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-02-14T15:07:12Z</dc:date>
    <item>
      <title>Comparaison Year/(Year -1) using selection</title>
      <link>https://community.qlik.com/t5/QlikView/Comparaison-Year-Year-1-using-selection/m-p/1544436#M745143</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&amp;nbsp;(Frensh version below)&lt;/P&gt;&lt;P&gt;I have a comparison to make according to the active selection. I have a histogram, from which I will choose one or more months and I have a table above in which I wish to compare the current year and the previous year only for the months selected in the histogram.&lt;/P&gt;&lt;P&gt;As in the example below: I selected the months 01/2019 and 02/2019&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;=&amp;gt; Column Y in the table shows me the cumulative of these two months for the current year and this is my first goal&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;=&amp;gt; The column Y-1 of the table should show me the cumulative of the same months for the previous year (01/2018 and 02/2018) but this is not the case.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The expression I used for Y-1 is:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Count({$&amp;lt;Year={"$(=max({&amp;lt;Source_Cash={'Cash'}&amp;gt;}Year)-1)",&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;[Year-Month]={"$(=GetFieldSelections([Year-Month]))"}&amp;gt;}[Value])&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Knowing that Year-Month is the dimension used in the histogram.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlik3.PNG" style="width: 676px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5990i47FFCA2D1799F22E/image-size/large?v=v2&amp;amp;px=999" role="button" title="qlik3.PNG" alt="qlik3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea please ?&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;(Frensh Version)&lt;/P&gt;&lt;P&gt;Bonjour tout le monde,&lt;/P&gt;&lt;P&gt;J'ai une comparaison à faire selon la sélection active. J'ai un histogramme, à partir duquel je vais choisir un ou plusieurs mois et j'ai un tableau au dessus dans lequel je souhaite faire la comparaison entre l'année en cours et l'année précédente seulement pour les mois sélectionnés dans l’histogramme.&lt;/P&gt;&lt;P&gt;Comme dans l'exemple ci dessous: J'ai sélectionné les mois 01/2019 et 02/2019&amp;nbsp;&lt;/P&gt;&lt;P&gt;=&amp;gt; &lt;FONT color="#339966"&gt;La colonne Y du tableau m'affiche le cumule de ces deux mois pour l'année en cours et c'est mon premier objectif&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt;&amp;nbsp;&lt;FONT color="#FF0000"&gt;La colonne Y-1 du tableau devrai m'afficher le cumule des mêmes mois pour l'année précédente (soit 01/2018 et 02/2018) mais ce n'est pas le cas.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;l'expression que j'ai utilisé pour Y-1 est la suivante:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Count({$&amp;lt;Year={"$(=max({&amp;lt;Source_Cash={'Cash'}&amp;gt;}Year)-1)",&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;[Year-Month]={"$(=GetFieldSelections([Year-Month]))"}&amp;gt;}[Value])&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Sachant que Year-Month est la dimension utilisé dans l'histogramme.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlik3.PNG" style="width: 676px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5990i47FFCA2D1799F22E/image-size/large?v=v2&amp;amp;px=999" role="button" title="qlik3.PNG" alt="qlik3.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Quelqu’un a une idée ?&lt;/P&gt;&lt;P&gt;Merci pour votre retour&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 04:26:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparaison-Year-Year-1-using-selection/m-p/1544436#M745143</guid>
      <dc:creator>reyouk3310</dc:creator>
      <dc:date>2024-11-16T04:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Comparaison Year/(Year -1) using selection</title>
      <link>https://community.qlik.com/t5/QlikView/Comparaison-Year-Year-1-using-selection/m-p/1544444#M745144</link>
      <description>&lt;P&gt;What expression did you use for Y?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 15:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparaison-Year-Year-1-using-selection/m-p/1544444#M745144</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-14T15:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Comparaison Year/(Year -1) using selection</title>
      <link>https://community.qlik.com/t5/QlikView/Comparaison-Year-Year-1-using-selection/m-p/1544449#M745145</link>
      <description>&lt;P&gt;The as-of-table might be the answer you are looking for. can you tell us more about the table fields.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 15:11:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparaison-Year-Year-1-using-selection/m-p/1544449#M745145</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2019-02-14T15:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Comparaison Year/(Year -1) using selection</title>
      <link>https://community.qlik.com/t5/QlikView/Comparaison-Year-Year-1-using-selection/m-p/1544469#M745146</link>
      <description>&lt;P&gt;&lt;U&gt;&lt;FONT color="#339966"&gt;For Y&lt;/FONT&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;I use a simple expression&amp;nbsp; :&amp;nbsp; &amp;nbsp; Count([Value])&lt;/P&gt;&lt;P&gt;=&amp;gt; So if no value is selected in my barshart, Y shows me all data , but if I select one bar or more&amp;nbsp; from my barshart, it will accumulate data the selected bar.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;FONT color="#339966"&gt;For Y-1&lt;/FONT&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;I have used the following expression :&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Count({$&amp;lt;Year={"$(=max({&amp;lt;Source_Cash={'Cash'}&amp;gt;}Year)-1)",&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;[Year-Month]={"$(=GetFieldSelections([Year-Month]))"}&amp;gt;}[Value])&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;=&amp;gt;&amp;nbsp; Year={"$(=max({&amp;lt;Source_Cash={'Cash_Services'}&amp;gt;}Year)-1)"} : is used to precise that I need the previous Year of the max year selected&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;=&amp;gt; [Year-Month]={"$(=GetFieldSelections([Year-Month]))"}; is used to precise that I need the accumulate of selected months&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thank you&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 15:41:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparaison-Year-Year-1-using-selection/m-p/1544469#M745146</guid>
      <dc:creator>reyouk3310</dc:creator>
      <dc:date>2019-02-14T15:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Comparaison Year/(Year -1) using selection</title>
      <link>https://community.qlik.com/t5/QlikView/Comparaison-Year-Year-1-using-selection/m-p/1544476#M745147</link>
      <description>&lt;P&gt;Do you have a Month field which doesn't have Year attached to it? If you do, then try this&lt;/P&gt;&lt;PRE&gt;Count({$&amp;lt;Year={"$(=max({&amp;lt;Source_Cash={'Cash'}&amp;gt;}Year)-1)"}&lt;FONT color="#FF0000"&gt;, [Year-Month], Month = p(Month)&lt;/FONT&gt;&amp;gt;}[Value]) &lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Feb 2019 15:54:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparaison-Year-Year-1-using-selection/m-p/1544476#M745147</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-14T15:54:17Z</dc:date>
    </item>
  </channel>
</rss>

