<?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: Populate or Hide Quarters based on Data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1576226#M741850</link>
    <description>&lt;P&gt;My bad, vMQ should be defined with a LET statement. But having said that, I could not get the expression to work in your sample for some reason. But i did get this working:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;(Sum({&amp;lt;Year = {$(=vMY)}&amp;gt;} Amount) / Sum({&amp;lt;Year = {$(=vMY-1)}&amp;gt;} Amount) - 1) * Sign(Sum({&amp;lt;Year = {$(=vMY)}&amp;gt;} Amount))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;This does not make use of vMQ, but suppresses the expression when the value for the current year is zero.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/11382iC787B084D6DB2B9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2019 05:50:08 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2019-05-03T05:50:08Z</dc:date>
    <item>
      <title>Populate or Hide Quarters based on Data</title>
      <link>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1575555#M741845</link>
      <description>&lt;P&gt;I have years (Current Year and Previous Year) and quarters. I need to show the change of difference over the year in Quarters. Since Current year is 2019 and we still are in May, the Quarters don't go beyond Q1. In this case, the table shows -100% which is mathematically correct but kind of deceptive. How do I dynamically create this table so that data is shown only when data is present in respective Quarters?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 563px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/11266iC07551825BBA3EF4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Comp&lt;/TD&gt;&lt;TD&gt;Q1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CompA&lt;/TD&gt;&lt;TD&gt;-36%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CompB&lt;/TD&gt;&lt;TD&gt;-25%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;As we go to the next Quarter, the data becomes available and the table should add Quarters dynamically. By end of this year, the output table should have all the 4 quarters.&lt;/P&gt;&lt;P&gt;&amp;#8;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp; Any help is really appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:57:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1575555#M741845</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2024-11-16T20:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Populate or Hide Quarters based on Data</title>
      <link>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1575693#M741846</link>
      <description>&lt;P&gt;I need to see what you are currently doing to advise exact solution but you can add conditional loads in script..&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;Load 'Q1' as Quarter, somevalue...resident sometable;&lt;/P&gt;&lt;P&gt;if num(month(now())) &amp;gt;=3 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;concatenate(Data)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Load 'Q2' as Quarter, somevalue...resident sometable;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;end if;&lt;/P&gt;&lt;P&gt;if num(month(now())) &amp;gt;=6 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;concatenate(Data)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Load 'Q3' as Quarter, somevalue...resident sometable;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;end if;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if num(month(now())) &amp;gt;=9 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;concatenate(Data)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Load 'Q4' as Quarter, somevalue...resident sometable;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;end if;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 05:11:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1575693#M741846</guid>
      <dc:creator>asinha1991</dc:creator>
      <dc:date>2019-05-02T05:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Populate or Hide Quarters based on Data</title>
      <link>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1575701#M741847</link>
      <description>&lt;P&gt;One way may be like this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Define the variables in the load (vMQ is split to defer the $ expansion and gets the max Q from the current year):&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Set vMY = '=Max(Year)';&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Set vMQ = '=MaxString({&amp;lt;Year = {$' &amp;amp; '(vMY)}&amp;gt;} Quarter)';&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Then use the ratio:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Sum({&amp;lt;Year = {$(vMY)}, Quarter = {"&amp;lt;=$(vMQ)"}&amp;gt;} Amount)&amp;nbsp;/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; Sum({&amp;lt;Year = {$(=vMY - 1)}, Quarter = {"&amp;lt;=$(vMQ)"}&amp;gt;} Amount)&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Or the variance:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;(Sum({&amp;lt;Year = {$(vMY)}, Quarter = {"&amp;lt;=$(vMQ)"}&amp;gt;} Amount) -&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Sum({&amp;lt;Year = {$(=vMY - 1)}, Quarter = {"&amp;lt;=$(vMQ)"}&amp;gt;} Amount)) /&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; Sum({&amp;lt;Year = {$(=vMY - 1)}, Quarter = {"&amp;lt;=$(vMQ)"}&amp;gt;} Amount)&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Finally, make sure that suppress zeroes is enabled for the table&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 02 May 2019 06:08:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1575701#M741847</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-05-02T06:08:01Z</dc:date>
    </item>
    <item>
      <title>Dynamically add quarters</title>
      <link>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1575979#M741849</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14931"&gt;@jonathandienst&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The given expression isn't working. Also, the &lt;STRONG&gt;vMQ&lt;/STRONG&gt; variable is giving an error. So I created &lt;STRONG&gt;vMQ1&lt;/STRONG&gt; inside the Variable Overview to check and it works.&lt;/P&gt;&lt;P&gt;I am attaching my qvw file. I want to show the difference between the current year and previous year in Quarter manner. If you look at the table, the difference % makes sense since we are already in Q1 2019. But for Q2, Q3, Q4, the value is -100% since we are not yet there. I want to make the calculation dynamic such that as we are in Q1, the table should show only Q1 and as we progress in the year towards the end, it should show Q2, Q3 and Q4.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 13:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1575979#M741849</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2019-05-06T13:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Populate or Hide Quarters based on Data</title>
      <link>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1576226#M741850</link>
      <description>&lt;P&gt;My bad, vMQ should be defined with a LET statement. But having said that, I could not get the expression to work in your sample for some reason. But i did get this working:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;(Sum({&amp;lt;Year = {$(=vMY)}&amp;gt;} Amount) / Sum({&amp;lt;Year = {$(=vMY-1)}&amp;gt;} Amount) - 1) * Sign(Sum({&amp;lt;Year = {$(=vMY)}&amp;gt;} Amount))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;This does not make use of vMQ, but suppresses the expression when the value for the current year is zero.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/11382iC787B084D6DB2B9B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 05:50:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1576226#M741850</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-05-03T05:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Populate or Hide Quarters based on Data</title>
      <link>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1576949#M741851</link>
      <description>&lt;P&gt;Nice, thank you so much.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 13:35:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Populate-or-Hide-Quarters-based-on-Data/m-p/1576949#M741851</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2019-05-06T13:35:09Z</dc:date>
    </item>
  </channel>
</rss>

