<?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: Set analysis using Year and/or month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-Year-and-or-month/m-p/1771288#M717708</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/77720"&gt;@akhwaja1&lt;/a&gt;&amp;nbsp;, you can create a variable like this :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;v&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;i_month&lt;/FONT&gt; &lt;/STRONG&gt;= max(&lt;/SPAN&gt;&lt;SPAN&gt;i_month)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;then use it in your expression :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=num(count ({$&amp;lt;[wholesale_month]*=[&lt;FONT color="#339966"&gt;&lt;STRONG&gt;$(vi_month)&lt;/STRONG&gt;&lt;/FONT&gt;],[wholesale_year]*=[i_year]&amp;gt;} unit),'#,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so if there is no selection over month, or of the user select two o more values over month&amp;nbsp; its going to take the max month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Dec 2020 22:11:08 GMT</pubDate>
    <dc:creator>QFabian</dc:creator>
    <dc:date>2020-12-30T22:11:08Z</dc:date>
    <item>
      <title>Set analysis using Year and/or month</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-Year-and-or-month/m-p/1771280#M717707</link>
      <description>&lt;P&gt;I have a set of top-level metric that counts the number of units wholesaled&amp;nbsp; or final delivered in a given month -&amp;nbsp;&lt;/P&gt;&lt;P&gt;=num(count ({$&amp;lt;[wholesale_month]*=[i_month],[wholesale_year]*=[i_year]&amp;gt;} unit),'#,##0')&lt;BR /&gt;=num(count({$&amp;lt;[fd_month] *=[i_month],[fd_year] *=[i_year]&amp;gt;}[unit]),'#,##0')&lt;/P&gt;&lt;P&gt;&amp;nbsp;I govern the selection of year and month using list boxes tied to i_year and i_month as shown in the image.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="akhwaja1_0-1609360973676.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/46298i6A4664028EAA2870/image-size/medium?v=v2&amp;amp;px=400" role="button" title="akhwaja1_0-1609360973676.png" alt="akhwaja1_0-1609360973676.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if only the year is selected and nothing in month, the metrics show 0. How do I extend the metric expressions so that I get a yearly value if the year is selected and a monthly value if both year and month are selected?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:23:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-Year-and-or-month/m-p/1771280#M717707</guid>
      <dc:creator>akhwaja1</dc:creator>
      <dc:date>2024-11-15T23:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis using Year and/or month</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-using-Year-and-or-month/m-p/1771288#M717708</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/77720"&gt;@akhwaja1&lt;/a&gt;&amp;nbsp;, you can create a variable like this :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;v&lt;/FONT&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;i_month&lt;/FONT&gt; &lt;/STRONG&gt;= max(&lt;/SPAN&gt;&lt;SPAN&gt;i_month)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;then use it in your expression :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=num(count ({$&amp;lt;[wholesale_month]*=[&lt;FONT color="#339966"&gt;&lt;STRONG&gt;$(vi_month)&lt;/STRONG&gt;&lt;/FONT&gt;],[wholesale_year]*=[i_year]&amp;gt;} unit),'#,##0')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so if there is no selection over month, or of the user select two o more values over month&amp;nbsp; its going to take the max month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 22:11:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-using-Year-and-or-month/m-p/1771288#M717708</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2020-12-30T22:11:08Z</dc:date>
    </item>
  </channel>
</rss>

