<?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: cytd-lytd -question? in Visualization and Usability</title>
    <link>https://community.qlik.com/t5/Visualization-and-Usability/cytd-lytd-question/m-p/1721008#M166370</link>
    <description>&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;I think the placement of the {1} is in the wrong location,&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnalysis/set-analysis-expressions.htm" target="_self"&gt;Set Analysis&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;count({1&amp;lt; [status] = {'1','2','3'}, CurYTDFlag={1}, Year=, Month= &amp;gt;} distinct [ID])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- count({1&amp;lt;[[status] = {'1','2','3'},LastYTDFlag={1}, Year=, Month= &amp;gt;} distinct [ID])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2) No.&amp;nbsp; If you did not ignore the filters and selected 02/03/2020, I would expect the first part of the expression to have only data for 02/03/2020 and the second part of the expression to be zero because the LastYTDFlag is not set to 1 for 02/03/2020.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jun 2020 21:22:49 GMT</pubDate>
    <dc:creator>jwjackso</dc:creator>
    <dc:date>2020-06-22T21:22:49Z</dc:date>
    <item>
      <title>cytd-lytd -question?</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/cytd-lytd-question/m-p/1720878#M166346</link>
      <description>&lt;P&gt;I have two questions regarding this expression i've written :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;count({1}{&amp;lt; [status] = {'1','2','3'}, CurYTDFlag={1}, Year=, Month= &amp;gt;} distinct [ID])&lt;BR /&gt;- count({1}{&amp;lt;[[status] = {'1','2','3'},LastYTDFlag={1}, Year=, Month= &amp;gt;} distinct [ID])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Adding {1} should be ignoring all filter&amp;nbsp; selections, right?&amp;nbsp; This isn't happening - why?&lt;/P&gt;&lt;P&gt;2) If I didn't want it to ignore all filter selections, does this mean that selecting a certain date this should show the count from 1/1/2020 to (say) 02/03/2020 minues 1/1/2019 to 02/03/2019?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanking you in advance&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ioanna&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 13:12:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/cytd-lytd-question/m-p/1720878#M166346</guid>
      <dc:creator>ioannagr</dc:creator>
      <dc:date>2020-06-22T13:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: cytd-lytd -question?</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/cytd-lytd-question/m-p/1721008#M166370</link>
      <description>&lt;P&gt;1)&lt;/P&gt;&lt;P&gt;I think the placement of the {1} is in the wrong location,&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/sense/June2020/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SetAnalysis/set-analysis-expressions.htm" target="_self"&gt;Set Analysis&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;count({1&amp;lt; [status] = {'1','2','3'}, CurYTDFlag={1}, Year=, Month= &amp;gt;} distinct [ID])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- count({1&amp;lt;[[status] = {'1','2','3'},LastYTDFlag={1}, Year=, Month= &amp;gt;} distinct [ID])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2) No.&amp;nbsp; If you did not ignore the filters and selected 02/03/2020, I would expect the first part of the expression to have only data for 02/03/2020 and the second part of the expression to be zero because the LastYTDFlag is not set to 1 for 02/03/2020.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 21:22:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/cytd-lytd-question/m-p/1721008#M166370</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2020-06-22T21:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: cytd-lytd -question?</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/cytd-lytd-question/m-p/1721219#M166406</link>
      <description>&lt;P&gt;Hi and thanks for your reply&lt;/P&gt;&lt;P&gt;1) i changed the placement like so, but still isn't static &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2) what should i write for this in order to work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5930"&gt;@jwjackso&lt;/a&gt;&amp;nbsp;, the date field for which i want to ignore filter selections has the name "Date", should i put it in the set analysis? Maybe that would make it static?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 10:37:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/cytd-lytd-question/m-p/1721219#M166406</guid>
      <dc:creator>ioannagr</dc:creator>
      <dc:date>2020-06-23T10:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: cytd-lytd -question?</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/cytd-lytd-question/m-p/1721316#M166433</link>
      <description>&lt;P&gt;Yes, Date would need to be in the expression.&amp;nbsp; Another way to handle YTD calculations is creating variables.&amp;nbsp; Using the data below:&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;Load *,&lt;BR /&gt;Year([Date]) as [Year],&lt;BR /&gt;Month([Date]) as [Month];&lt;BR /&gt;Load * Inline [&lt;BR /&gt;Dept,CurYTDFlag,Date,Amt&lt;BR /&gt;D101,1,06/01/2020,100&lt;BR /&gt;D101,1,05/01/2020,100&lt;BR /&gt;D101,0,01/01/2019,100&lt;BR /&gt;D102,1,04/01/2020,200&lt;BR /&gt;D102,0,04/01/2019,200&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Let vCurrentYTD=Replace('[Date]={"&amp;lt;=@(=Date(Floor(Now()),"MM/DD/YYYY"))"},CurYTDFlag={1},[Year]=,[Month]=','@','$');&lt;BR /&gt;Let vPriorYTD=Replace('[Date]={"&amp;lt;=@(=Date(AddMonths(Floor(Now()),-12),"MM/DD/YYYY"))"},CurYTDFlag={0},[Year]=,[Month]=','@','$');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Replace statement is changing the '@' to '$'.&amp;nbsp; Below are the variables in use:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YTD.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36098i1D05B265739C2567/image-size/large?v=v2&amp;amp;px=999" role="button" title="YTD.PNG" alt="YTD.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the expression editor, you can see how the vCurrentYTD and vPriorYTD variables in the expression are expanded:&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;$(vCurrentYTD)&amp;gt;}Amt) - Sum({&amp;lt;$(vPriorYTD)&amp;gt;}Amt)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YTD2.PNG" style="width: 929px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/36100i2EA039245B4D6F7E/image-size/large?v=v2&amp;amp;px=999" role="button" title="YTD2.PNG" alt="YTD2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 14:31:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/cytd-lytd-question/m-p/1721316#M166433</guid>
      <dc:creator>jwjackso</dc:creator>
      <dc:date>2020-06-23T14:31:19Z</dc:date>
    </item>
  </channel>
</rss>

