<?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: Expanding Ranges in Expression. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expanding-Ranges-in-Expression/m-p/1677034#M727844</link>
    <description>&lt;P&gt;ah ok&lt;/P&gt;&lt;P&gt;attached new version&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=count(aggr(min(Date),[Field 1],[Field 2],[Field 3]))&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 636px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/28634i276EDD27EA1758EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2020 12:51:39 GMT</pubDate>
    <dc:creator>Taoufiq_Zarra</dc:creator>
    <dc:date>2020-02-19T12:51:39Z</dc:date>
    <item>
      <title>Expanding Ranges in Expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Expanding-Ranges-in-Expression/m-p/1676891#M727841</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am fairly new to Qlikview, and know a little bit of set expressions. I was trying to achieve something where in i want to calculate the distinct counts in a pivot, but the catch being, the range for distinct count should be all dates &amp;lt;= the date that i am pivoting on.&lt;/P&gt;&lt;P&gt;I tried to achieve this using set analysis, but it doesnt work, wanted to check with the community if there is a better way of achieving it.&lt;/P&gt;&lt;P&gt;My data would be something like below:&lt;/P&gt;&lt;TABLE width="268"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="76"&gt;Date&lt;/TD&gt;&lt;TD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lt;TD&gt;02/02/2020&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/02/2020&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/02/2020&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/02/2020&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;27&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking at taking a distinct count of Field 1 and 2 on the range of dates &amp;lt;= given date:&lt;/P&gt;&lt;P&gt;the expected outcome is as below:&lt;/P&gt;&lt;P&gt;This is a pivot&lt;/P&gt;&lt;TABLE width="256"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="76"&gt;Date&lt;/TD&gt;&lt;TD width="45"&gt;Field 3&lt;/TD&gt;&lt;TD width="135"&gt;Counts (Rolling dates)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/01/2020&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;27&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/01/2020&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;27&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone help me to understand the best way to achieve this. Tried multiple posts on the community and wasn't able to come close to the requirement.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:05:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expanding-Ranges-in-Expression/m-p/1676891#M727841</guid>
      <dc:creator>Mawkishrains</dc:creator>
      <dc:date>2024-11-16T19:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Expanding Ranges in Expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Expanding-Ranges-in-Expression/m-p/1676977#M727842</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I don't know if I understood your post !&lt;/P&gt;&lt;P&gt;because I feel like count()&amp;nbsp; is enough&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=count(distinct [Field 1]&amp;amp;[Field 2])&lt;/LI-CODE&gt;&lt;P&gt;attached a qlikview file&lt;/P&gt;&lt;P&gt;I didn't get the 1 for the 27 in 02/01/2020 since you have A B , A C and BB&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 486px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/28626i8120257F34338985/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;??&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 10:24:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expanding-Ranges-in-Expression/m-p/1676977#M727842</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-02-19T10:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Expanding Ranges in Expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Expanding-Ranges-in-Expression/m-p/1677024#M727843</link>
      <description>&lt;P&gt;Precisely why plain count doesnt work,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to check all previous dates if the combination exists and take just the unique counts, so since&amp;nbsp; AB AC are already on the earlier date, i just want to consider BB 27 and hence the count 1.&lt;/P&gt;&lt;P&gt;Was able to build the logic in SQL by using not exists, but lost here.&lt;/P&gt;&lt;P&gt;Thanks for the suggestion though.&lt;/P&gt;&lt;P&gt;-Kris.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 12:38:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expanding-Ranges-in-Expression/m-p/1677024#M727843</guid>
      <dc:creator>Mawkishrains</dc:creator>
      <dc:date>2020-02-19T12:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Expanding Ranges in Expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Expanding-Ranges-in-Expression/m-p/1677034#M727844</link>
      <description>&lt;P&gt;ah ok&lt;/P&gt;&lt;P&gt;attached new version&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=count(aggr(min(Date),[Field 1],[Field 2],[Field 3]))&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 636px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/28634i276EDD27EA1758EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 12:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expanding-Ranges-in-Expression/m-p/1677034#M727844</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2020-02-19T12:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Expanding Ranges in Expression.</title>
      <link>https://community.qlik.com/t5/QlikView/Expanding-Ranges-in-Expression/m-p/1687446#M727845</link>
      <description>&lt;P&gt;If Taoufiq's last post and example got you what you needed, do not forget to properly close out your thread by returning on on that last post of his, use the Accept as Solution button to mark it, which gives him credit for the help and lets other Members know that worked.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other place you will likely find helpful going forward is the following, lots of how-to posts here from our internal experts:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 19:25:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expanding-Ranges-in-Expression/m-p/1687446#M727845</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-03-24T19:25:13Z</dc:date>
    </item>
  </channel>
</rss>

