<?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: Dynamic Monthly Variance returning zeros in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-Monthly-Variance-returning-zeros/m-p/2479722#M100627</link>
    <description>&lt;P&gt;My best guess is that you have some kind of issue with the Date modifier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try removing the date formating like this and replacing it with a num&lt;/P&gt;
&lt;P&gt;sum({$&amp;lt;Date = {"&amp;gt;=$(=floor(MonthStart(Today())))&amp;lt;=$(=floor(MonthEnd(Today())))"}&amp;gt;} [Sales Quantity])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or format the date as a string like this:&lt;/P&gt;
&lt;P&gt;sum({$&amp;lt;Date = {"&amp;gt;='$(=Date(MonthStart(Today()), ''DD/MM/YYYY''))'&amp;lt;='$(=Date(MonthEnd(Today()), ''DD/MM/YYYY''))'"}&amp;gt;} [Sales Quantity])&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2024 19:29:30 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2024-09-04T19:29:30Z</dc:date>
    <item>
      <title>Dynamic Monthly Variance returning zeros</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Monthly-Variance-returning-zeros/m-p/2479690#M100622</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="variance_problem.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/171289i43B1678D228C8D64/image-size/large?v=v2&amp;amp;px=999" role="button" title="variance_problem.png" alt="variance_problem.png" /&gt;&lt;/span&gt;I want to see the monthly variance for the products sold. Each month selected displays two measures: sold quantity and variance. The user can select a year dimension and a month dimension, this correctly updates the sales quantity measure.&lt;/P&gt;
&lt;P&gt;However, I'm trying to use set analysis to dynamically update the variance of the quantity sold using the below formula - but like I say, it's returning zeros. Please can someone help?&lt;/P&gt;
&lt;P&gt;sum({$&amp;lt;Date = {"&amp;gt;=$(=Date(MonthStart(Today()), 'DD/MM/YYYY'))&amp;lt;=$(=Date(MonthEnd(Today()), 'DD/MM/YYYY'))"}&amp;gt;} [Sales Quantity])&lt;BR /&gt;-&lt;BR /&gt;sum({$&amp;lt;Date = {"&amp;gt;=$(=Date(MonthStart(AddMonths(Today(), -1)), 'DD/MM/YYYY'))&amp;lt;=$(=Date(MonthEnd(AddMonths(Today(), -1)), 'DD/MM/YYYY'))"}&amp;gt;} [Sales Quantity])&lt;BR /&gt;&lt;BR /&gt;Just to add, I'm aware I can use this:&lt;BR /&gt;sum([Sales Quantity])&lt;BR /&gt;-&lt;BR /&gt;Before(sum([Sales Quantity]))&lt;BR /&gt;&lt;BR /&gt;However, this leaves the first month's variance blank, as there is no preceding month column to calculate a variance from.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 16:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Monthly-Variance-returning-zeros/m-p/2479690#M100622</guid>
      <dc:creator>HClegg</dc:creator>
      <dc:date>2024-09-04T16:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Monthly Variance returning zeros</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Monthly-Variance-returning-zeros/m-p/2479722#M100627</link>
      <description>&lt;P&gt;My best guess is that you have some kind of issue with the Date modifier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try removing the date formating like this and replacing it with a num&lt;/P&gt;
&lt;P&gt;sum({$&amp;lt;Date = {"&amp;gt;=$(=floor(MonthStart(Today())))&amp;lt;=$(=floor(MonthEnd(Today())))"}&amp;gt;} [Sales Quantity])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or format the date as a string like this:&lt;/P&gt;
&lt;P&gt;sum({$&amp;lt;Date = {"&amp;gt;='$(=Date(MonthStart(Today()), ''DD/MM/YYYY''))'&amp;lt;='$(=Date(MonthEnd(Today()), ''DD/MM/YYYY''))'"}&amp;gt;} [Sales Quantity])&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2024 19:29:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Monthly-Variance-returning-zeros/m-p/2479722#M100627</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2024-09-04T19:29:30Z</dc:date>
    </item>
  </channel>
</rss>

