<?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 Dates in Sum Expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dates-in-Sum-Expressions/m-p/1612987#M445282</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a table with three fields:&amp;nbsp; [Shipment Due Date], [Actual Shipped Date] and [Shipped Dollar Value].&amp;nbsp; I'm trying to create a chart with date as a dimension and 8 fields:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The sum of the moneys expected/due to be shipped on that date&lt;/LI&gt;&lt;LI&gt;The sum of the moneys actually shipped on that date&lt;/LI&gt;&lt;LI&gt;For that date, the sum of the moneys expected to be shipped between that date and the first of the month.&lt;/LI&gt;&lt;LI&gt;For that date, the sum of the moneys actually shipped between that date and the first of the month.&lt;/LI&gt;&lt;LI&gt;The&amp;nbsp;sum of the moneys expected/due to be shipped on that date 1 year ago&lt;/LI&gt;&lt;LI&gt;The sum of the moneys actually shipped on that date 1 year ago&lt;/LI&gt;&lt;LI&gt;For that date, the sum of the moneys expected to be shipped between that date and the first of the month 1 year ago.&lt;/LI&gt;&lt;LI&gt;For that date, the sum of the moneys actually shipped between that date and the first of the month 1 year ago.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I have a master calendar, I'm attempting to use its 'Date' field as my dimension.&amp;nbsp; This is my expression for the first field:&lt;/P&gt;&lt;P&gt;Sum ({$&amp;lt;Date={[Shipment Due Date]}&amp;gt;} [Shipped Dollar Value])&lt;/P&gt;&lt;P&gt;But the field is returning 0 for all dates.&amp;nbsp; Anyone able to see what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 02:43:44 GMT</pubDate>
    <dc:creator>anamiac</dc:creator>
    <dc:date>2024-11-16T02:43:44Z</dc:date>
    <item>
      <title>Dates in Sum Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Sum-Expressions/m-p/1612987#M445282</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a table with three fields:&amp;nbsp; [Shipment Due Date], [Actual Shipped Date] and [Shipped Dollar Value].&amp;nbsp; I'm trying to create a chart with date as a dimension and 8 fields:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The sum of the moneys expected/due to be shipped on that date&lt;/LI&gt;&lt;LI&gt;The sum of the moneys actually shipped on that date&lt;/LI&gt;&lt;LI&gt;For that date, the sum of the moneys expected to be shipped between that date and the first of the month.&lt;/LI&gt;&lt;LI&gt;For that date, the sum of the moneys actually shipped between that date and the first of the month.&lt;/LI&gt;&lt;LI&gt;The&amp;nbsp;sum of the moneys expected/due to be shipped on that date 1 year ago&lt;/LI&gt;&lt;LI&gt;The sum of the moneys actually shipped on that date 1 year ago&lt;/LI&gt;&lt;LI&gt;For that date, the sum of the moneys expected to be shipped between that date and the first of the month 1 year ago.&lt;/LI&gt;&lt;LI&gt;For that date, the sum of the moneys actually shipped between that date and the first of the month 1 year ago.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I have a master calendar, I'm attempting to use its 'Date' field as my dimension.&amp;nbsp; This is my expression for the first field:&lt;/P&gt;&lt;P&gt;Sum ({$&amp;lt;Date={[Shipment Due Date]}&amp;gt;} [Shipped Dollar Value])&lt;/P&gt;&lt;P&gt;But the field is returning 0 for all dates.&amp;nbsp; Anyone able to see what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Sum-Expressions/m-p/1612987#M445282</guid>
      <dc:creator>anamiac</dc:creator>
      <dc:date>2024-11-16T02:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in Sum Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Sum-Expressions/m-p/1612990#M445283</link>
      <description>&lt;P&gt;please share qvw or rawdata&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 16:12:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Sum-Expressions/m-p/1612990#M445283</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2019-08-15T16:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in Sum Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Sum-Expressions/m-p/1612999#M445284</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29675"&gt;@Frank_Hartmann&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;please share qvw or rawdata&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The qvw is 440 MB and I'm not sure if my company policies allow me to share it online.&amp;nbsp; I've attached the data as it appears after the load (the internal table).&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 16:30:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Sum-Expressions/m-p/1612999#M445284</guid>
      <dc:creator>anamiac</dc:creator>
      <dc:date>2019-08-15T16:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in Sum Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Sum-Expressions/m-p/1614922#M445365</link>
      <description>&lt;P&gt;&lt;STRONG&gt;This is solved, not by expressions, but by modifying my load script.&amp;nbsp; It was originally something like this:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ShipmentActual:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load [Shipped Date Actual] AS [Actual Ship Date],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Ship Date] As [Expected Ship Date],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IF($(_SysDBVersionNum)&amp;gt;=13.2,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;([Shipped Picked Quantity] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Unit Price] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Rate $(_SysBaseCurrency)] / &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Price Unit Conversion]),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;([Shipped Picked Quantity] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Unit Price] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Rate $(_SysBaseCurrency)] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Price Unit Conversion])&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;) as [Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;%ShipReqLineKey&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;From $(_SysPathQVDDirectory)$(_SysQVDPrefix)ShippingRequests.qvd (qvd)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;WHERE NOT IsNull([Shipped Picked Quantity]);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here's what it is now:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ShipmentActual:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load [Shipped Date Actual] AS [SA Shipment Date],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IF($(_SysDBVersionNum)&amp;gt;=13.2,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;([Shipped Picked Quantity] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Unit Price] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Rate $(_SysBaseCurrency)] / &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Price Unit Conversion]),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;([Shipped Picked Quantity] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Unit Price] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Rate $(_SysBaseCurrency)] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Price Unit Conversion])&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;) as [SA Actual Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;%ShipReqLineKey, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;month([Shipped Date Actual]) as [SA Shipment Month],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;year([Shipped Date Actual]) as [SA Shipment Year]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;From $(_SysPathQVDDirectory)$(_SysQVDPrefix)ShippingRequests.qvd (qvd)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;WHERE NOT IsNull([Shipped Picked Quantity]);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;Concatenate(ShipmentActual)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Ship Date] AS [SA Shipment Date],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IF($(_SysDBVersionNum)&amp;gt;=13.2,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;([Shipped Picked Quantity] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Unit Price] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Rate $(_SysBaseCurrency)] / &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Price Unit Conversion]),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;([Shipped Picked Quantity] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Unit Price] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Rate $(_SysBaseCurrency)] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Price Unit Conversion])&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;) as [SA Expected Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;%ShipReqLineKey &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;From $(_SysPathQVDDirectory)$(_SysQVDPrefix)ShippingRequests.qvd (qvd)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;WHERE NOT IsNull([Shipped Picked Quantity]);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Concatenate(ShipmentActual)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load addyears([Shipped Date Actual],1) AS [SA Shipment Date],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IF($(_SysDBVersionNum)&amp;gt;=13.2,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;([Shipped Picked Quantity] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Unit Price] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Rate $(_SysBaseCurrency)] / &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Price Unit Conversion]),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;([Shipped Picked Quantity] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Unit Price] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Rate $(_SysBaseCurrency)] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Price Unit Conversion])&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;) as [SA PrevYear Actual Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;%ShipReqLineKey &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;From $(_SysPathQVDDirectory)$(_SysQVDPrefix)ShippingRequests.qvd (qvd)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;WHERE NOT IsNull([Shipped Picked Quantity]);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Concatenate(ShipmentActual)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;addyears([Ship Date],1) AS [SA Shipment Date],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IF($(_SysDBVersionNum)&amp;gt;=13.2,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;([Shipped Picked Quantity] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Unit Price] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Rate $(_SysBaseCurrency)] / &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Price Unit Conversion]),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;([Shipped Picked Quantity] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Unit Price] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Rate $(_SysBaseCurrency)] * &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[Shipping Price Unit Conversion])&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;) as [SA PrevYear Expected Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;%ShipReqLineKey &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;From $(_SysPathQVDDirectory)$(_SysQVDPrefix)ShippingRequests.qvd (qvd)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;WHERE NOT IsNull([Shipped Picked Quantity]);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ShipmentActual2:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[SA Shipment Date] as [SA2 Shipment Date],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;sum([SA Actual Shipped Dollar Value]) as [SA2 Actual Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;sum([SA Expected Shipped Dollar Value]) as [SA2 Expected Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;sum([SA PrevYear Actual Shipped Dollar Value]) as [SA2 PrevYear Actual Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;sum([SA PrevYear Expected Shipped Dollar Value]) as [SA2 PrevYear Expected Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;%ShipReqLineKey,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Day([SA Shipment Date]) as [SA2 Small Day]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;resident ShipmentActual&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;group by [SA Shipment Date], %ShipReqLineKey;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let vMaxDays = 31;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;for vOuterLoop = 0 to vMaxDays&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;for vInnerLoop = vOuterLoop to vMaxDays&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DayMapping:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;LOAD&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;$(vOuterLoop) as [smaller date],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;$(vInnerLoop) as [larger date]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;AUTOGENERATE(1);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;next&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;next&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;left join (ShipmentActual2)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;load &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[smaller date] as [SA2 Small Day],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[larger date] as [SA2 Large Day]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Resident DayMapping;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Concatenate(ShipmentActual)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;date([SA2 Shipment Date] - [SA2 Small Day] + [SA2 Large Day]) as [SA Shipment Date],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[SA2 Actual Shipped Dollar Value] as [SA MTD Actual Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[SA2 Expected Shipped Dollar Value] as [SA MTD Expected Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[SA2 PrevYear Actual Shipped Dollar Value] as [SA MTD PrevYear Actual Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;[SA2 PrevYear Expected Shipped Dollar Value] as [SA MTD PrevYear Expected Shipped Dollar Value],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;%ShipReqLineKey, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;month([SA2 Shipment Date]) as [SA Shipment Month],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;year([SA2 Shipment Date]) as [SA Shipment Year]&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Resident ShipmentActual2&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;where month([SA2 Shipment Date] - [SA2 Small Day] + [SA2 Large Day]) = Month([SA2 Shipment Date]);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;drop table ShipmentActual2;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;drop table DayMapping;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;let vMaxDays=;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;let vOuterLoop=;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;let vInnerLoop=;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 14:47:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Sum-Expressions/m-p/1614922#M445365</guid>
      <dc:creator>anamiac</dc:creator>
      <dc:date>2019-08-21T14:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dates in Sum Expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Dates-in-Sum-Expressions/m-p/1617924#M445556</link>
      <description>&lt;P&gt;Joseph, you can actually reduce the app quite a bit by using the File\Reduce Data\Keep Possible Values, but you need to make some selections first to be able to keep enough to still show the issue and data model etc.&amp;nbsp; The other piece you can use is in Settings\Document Properties\Scrambling tab to scramble values in a fields that are confidential etc.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 20:47:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dates-in-Sum-Expressions/m-p/1617924#M445556</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-08-28T20:47:31Z</dc:date>
    </item>
  </channel>
</rss>

