<?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: Dynamic Month for Year dimension in Bar Graph in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-Month-for-Year-dimension-in-Bar-Graph/m-p/2530840#M107871</link>
    <description>&lt;P&gt;I figured it out eventually. Thanks for your answer&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28877"&gt;@hugo_andrade&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Sum(&lt;BR /&gt;If(&lt;BR /&gt;Year([Month]) = Year(Max(TOTAL [Month]))&lt;BR /&gt;and Month([Month]) = Month(Max(TOTAL [Month]))&lt;BR /&gt;and [Gender] = 'Male'&lt;BR /&gt;and [Worker Type] = 'Employee'&lt;BR /&gt;and [Flag] = 'ME',&lt;BR /&gt;[eHeadcount],&lt;/P&gt;&lt;P&gt;If(&lt;BR /&gt;Year([Month]) &amp;lt; Year(Max(TOTAL [Month]))&lt;BR /&gt;and Month([Month]) = 12&lt;BR /&gt;and [Gender] = 'Male'&lt;BR /&gt;and [Worker Type] = 'Employee'&lt;BR /&gt;and [Flag] = 'ME',&lt;BR /&gt;[eHeadcount]&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Mon, 15 Sep 2025 18:46:55 GMT</pubDate>
    <dc:creator>ckyrosis</dc:creator>
    <dc:date>2025-09-15T18:46:55Z</dc:date>
    <item>
      <title>Dynamic Month for Year dimension in Bar Graph</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Month-for-Year-dimension-in-Bar-Graph/m-p/2529599#M107713</link>
      <description>&lt;P&gt;As a follow up to my&amp;nbsp;&lt;A href="https://community.qlik.com/t5/App-Development/100-Stacked-bar-but-show-count-values-as-data-labels/m-p/2528659#M107580" target="_blank" rel="noopener"&gt;previous post,&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My dimension is&amp;nbsp;&lt;/P&gt;&lt;P&gt;=If(Match(Year, '2025', '2024', '2023'), Year)&lt;/P&gt;&lt;P&gt;And my expression is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SUM({&amp;lt;&lt;BR /&gt;Month.autoCalendar.Month={"$(=Month(Max(Month)))"},&lt;BR /&gt;[Flag] = {'ME'},&lt;BR /&gt;[Gender]={'Male'},&lt;BR /&gt;[Worker Type]={'Employee'}&lt;BR /&gt;&amp;gt;} [eHeadcount]),&lt;/P&gt;&lt;P&gt;This gives me the Male month end headcount for the &lt;U&gt;current &lt;/U&gt;Max month across the years in my dimension&lt;BR /&gt;-Aug 2025&lt;BR /&gt;-Aug 2024&lt;BR /&gt;-Aug 2023&lt;BR /&gt;&lt;BR /&gt;I need it to always show month end December for the previous years and max month for current year&amp;nbsp;&lt;BR /&gt;-Aug 2025&lt;BR /&gt;-Dec 2024&lt;BR /&gt;-Dec 2023&lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2025 20:12:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Month-for-Year-dimension-in-Bar-Graph/m-p/2529599#M107713</guid>
      <dc:creator>ckyrosis</dc:creator>
      <dc:date>2025-09-04T20:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Month for Year dimension in Bar Graph</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Month-for-Year-dimension-in-Bar-Graph/m-p/2529609#M107714</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/196964"&gt;@ckyrosis&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;One simple approach is to handle this in the script by creating a couple of helper flags. For example:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;One flag that marks December for all previous years&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Another flag that marks the current month for the current year&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Then in your chart you don’t need to wrestle with conditional set analysis. You just use that flag in the set, and it automatically picks the right month for each year.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2025 23:02:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Month-for-Year-dimension-in-Bar-Graph/m-p/2529609#M107714</guid>
      <dc:creator>hugo_andrade</dc:creator>
      <dc:date>2025-09-04T23:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Month for Year dimension in Bar Graph</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Month-for-Year-dimension-in-Bar-Graph/m-p/2530840#M107871</link>
      <description>&lt;P&gt;I figured it out eventually. Thanks for your answer&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28877"&gt;@hugo_andrade&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Sum(&lt;BR /&gt;If(&lt;BR /&gt;Year([Month]) = Year(Max(TOTAL [Month]))&lt;BR /&gt;and Month([Month]) = Month(Max(TOTAL [Month]))&lt;BR /&gt;and [Gender] = 'Male'&lt;BR /&gt;and [Worker Type] = 'Employee'&lt;BR /&gt;and [Flag] = 'ME',&lt;BR /&gt;[eHeadcount],&lt;/P&gt;&lt;P&gt;If(&lt;BR /&gt;Year([Month]) &amp;lt; Year(Max(TOTAL [Month]))&lt;BR /&gt;and Month([Month]) = 12&lt;BR /&gt;and [Gender] = 'Male'&lt;BR /&gt;and [Worker Type] = 'Employee'&lt;BR /&gt;and [Flag] = 'ME',&lt;BR /&gt;[eHeadcount]&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2025 18:46:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Month-for-Year-dimension-in-Bar-Graph/m-p/2530840#M107871</guid>
      <dc:creator>ckyrosis</dc:creator>
      <dc:date>2025-09-15T18:46:55Z</dc:date>
    </item>
  </channel>
</rss>

