<?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: Slowly Changing Dimensions Sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Slowly-Changing-Dimensions-Sum/m-p/1267464#M852863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to dynamically respond to data selections, you cannot rely on the derived flag field. You will need to use an expression like&amp;nbsp; my first proposal:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(Aggr(FirstSortedValue(Amount, -Date), ID))&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2017 07:50:27 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2017-02-27T07:50:27Z</dc:date>
    <item>
      <title>Slowly Changing Dimensions Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-Changing-Dimensions-Sum/m-p/1267461#M852860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am struggling with my syntax and set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get the sum of the status OPN. When changing the date it should only include the latest Status for that ID.&lt;/P&gt;&lt;P&gt;Using the below table: If we selected the date 2017/02/04 the sum of amount would be 150+200 = 350. We wouldn't select 2017/01/31 as that status has changed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 267px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="75"&gt;Date&lt;/TD&gt;&lt;TD width="64"&gt;Status&lt;/TD&gt;&lt;TD width="64"&gt;Amount&lt;/TD&gt;&lt;TD width="64"&gt;ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2017/01/31&lt;/TD&gt;&lt;TD&gt;OPN&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2017/02/01&lt;/TD&gt;&lt;TD&gt;CLS&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2017/02/04&lt;/TD&gt;&lt;TD&gt;FNL&lt;/TD&gt;&lt;TD align="right"&gt;100&lt;/TD&gt;&lt;TD&gt;AAA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2017/01/30&lt;/TD&gt;&lt;TD&gt;OPN&lt;/TD&gt;&lt;TD align="right"&gt;150&lt;/TD&gt;&lt;TD&gt;BBB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2017/02/03&lt;/TD&gt;&lt;TD&gt;OPN&lt;/TD&gt;&lt;TD align="right"&gt;200&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;"&gt;CCC&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure which variables to create or the correct syntax/flags to use to create the text box to show this value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-Changing-Dimensions-Sum/m-p/1267461#M852860</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly Changing Dimensions Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-Changing-Dimensions-Sum/m-p/1267462#M852861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could do this in a text box:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum(Aggr(FirstSortedValue(Amount, -Date), ID))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although I would create a derived flag value in the load script and then use&amp;nbsp; a simple set expression. That will generally be quicker than the Aggr() expression above.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Sum({&amp;lt;Latest = {1}&amp;gt;} Amount)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 07:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-Changing-Dimensions-Sum/m-p/1267462#M852861</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-02-27T07:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly Changing Dimensions Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-Changing-Dimensions-Sum/m-p/1267463#M852862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done the flag, however, the issue comes up when changing the date to look back at previous dates.&lt;/P&gt;&lt;P&gt;Having that flag will include incorrect statuses that should not be there. I am not sure how to create the correct flag.&lt;/P&gt;&lt;P&gt;Eg: Selecting 2017/01/31 should give a value of 250 as at that date there were 2 ID's in OPN status.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 07:33:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-Changing-Dimensions-Sum/m-p/1267463#M852862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-27T07:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly Changing Dimensions Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Slowly-Changing-Dimensions-Sum/m-p/1267464#M852863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to dynamically respond to data selections, you cannot rely on the derived flag field. You will need to use an expression like&amp;nbsp; my first proposal:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(Aggr(FirstSortedValue(Amount, -Date), ID))&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 07:50:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slowly-Changing-Dimensions-Sum/m-p/1267464#M852863</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-02-27T07:50:27Z</dc:date>
    </item>
  </channel>
</rss>

