<?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: Chart Date Dimension with Most Recent Received as Measure in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730711#M55737</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I was just retesting and actually the second equation is almost there, there must have been an issue with the data reload when I created 'DUAL' for [Report].&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count({&amp;lt;[Milestone]={'IN'}&amp;gt;}aggr(IF([Submittal Date]=Max(TOTAL&amp;lt;[Sensor ID]&amp;gt;{&amp;lt;[Milestone]={'IN'}&amp;gt;}[Submittal Date]),[Sensor ID]),[Sensor ID],[Submittal Date])).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It is accurately selecting for 'LAST', the issue now is on the drill down. When filtering by year, expected values should still be for 'LAST' of the whole data set, not 'LAST' for that year.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jul 2020 16:24:54 GMT</pubDate>
    <dc:creator>epar5lcd</dc:creator>
    <dc:date>2020-07-24T16:24:54Z</dc:date>
    <item>
      <title>Bar Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1728622#M55553</link>
      <description>&lt;P&gt;I am trying to chart the most recent date a sensor is reporting. My dimension is a master calendar that has custom 'year/seasons' that I use in a drill down. The goal is to show when a particular sensor stopped reporting. I have about 84K records with the following structure:&lt;/P&gt;&lt;TABLE width="453"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="74"&gt;Tower ID&lt;/TD&gt;&lt;TD width="74"&gt;Sensor ID&lt;/TD&gt;&lt;TD width="74"&gt;Event ID&lt;/TD&gt;&lt;TD width="86"&gt;Report&lt;/TD&gt;&lt;TD width="70"&gt;Milestone&lt;/TD&gt;&lt;TD width="75"&gt;Submittal Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;6/5/1985&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;J&lt;/TD&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;8/13/1986&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;8/24/1987&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;400&lt;/TD&gt;&lt;TD&gt;H&lt;/TD&gt;&lt;TD&gt;103&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;12/29/1987&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;OUT&lt;/TD&gt;&lt;TD&gt;3/21/1988&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&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t;/TR&gt;&lt;TR&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;G&lt;/TD&gt;&lt;TD&gt;116&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;10/2/1989&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A tower can have multiple sensors, a sensor can report multiple times (each with an event ID), certain reports may trigger a response (IN/OUT). More than one report can be generated by a sensor in a day, reports are a DUAL value (listed above as a number for simplicity). When multiple reports are generated in one day, the highest value report takes precedent.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is a bar chart showing ALL reports received to date by simply plotting date as a dimension and Count( [Sensor ID]) as measure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="epar5lcd_0-1594998244862.png" style="width: 582px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37650iBB454F9429DCF18A/image-dimensions/582x200?v=v2" width="582" height="200" role="button" title="epar5lcd_0-1594998244862.png" alt="epar5lcd_0-1594998244862.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My goal is to generate a bar chart like the one below (this was not done in Qlik) that shows the count of the last report received for a sensor aggregated by year. Comparing the two charts, of the 36 reports received in 1987 (above), 35 sensors have reported since, only one (below) has a most recent report dated to 1987.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="most recent.png" style="width: 582px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37653iBE29B8820DA0E4A0/image-dimensions/582x200?v=v2" width="582" height="200" role="button" title="most recent.png" alt="most recent.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the above table example I am trying to get this result in the sample data table:&lt;/P&gt;&lt;TABLE width="453"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="74"&gt;Tower ID&lt;/TD&gt;&lt;TD width="74"&gt;Sensor ID&lt;/TD&gt;&lt;TD width="74"&gt;Event ID&lt;/TD&gt;&lt;TD width="86"&gt;Report&lt;/TD&gt;&lt;TD width="70"&gt;Milestone&lt;/TD&gt;&lt;TD width="75"&gt;Submittal Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;8/24/1987&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;109&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;6/7/1989&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;112&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;9/18/1989&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;107&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;6/1/1989&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;400&lt;/TD&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;TD&gt;104&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;7/14/1988&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;113&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;9/25/1989&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;G&lt;/TD&gt;&lt;TD&gt;116&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;10/2/1989&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;400&lt;/TD&gt;&lt;TD&gt;H&lt;/TD&gt;&lt;TD&gt;114&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;10/2/1989&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;TD&gt;I&lt;/TD&gt;&lt;TD&gt;106&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;2/21/1989&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;J&lt;/TD&gt;&lt;TD&gt;115&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;IN&lt;/TD&gt;&lt;TD&gt;10/2/1989&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table above corresponds to Most Recent IN Report by Distinct Sensor ID. I have tried calculating the measure using both MAX() and FirstSortedValue(). Below are a few formulas I have tried with no luck.&lt;/P&gt;&lt;P&gt;Count(Aggr(Max([Submittal Date]), [Sensor ID]))&lt;/P&gt;&lt;P&gt;Count(Aggr(FirstSortedValue([Sensor ID], -[Submittal Date]), [Sensor ID]))&lt;/P&gt;&lt;P&gt;Count(IF([Submittal Date]=Aggr(Max([Submittal Date]), [Sensor ID]), [Sensor ID]))&lt;/P&gt;&lt;P&gt;Count(IF(Aggr(NODISTINCT Max([Submittal Date]), [Sensor ID]) = [Submittal Date], [Sensor ID]))&lt;/P&gt;&lt;P&gt;I am aware that I will need to add set analysis to remove my 'OUT' milestones&amp;nbsp;{&amp;lt;[Milestone]={'IN'}&amp;gt;}. I also noticed that when I drill down most of these formulas recalculate most recent based on the current selection so instead of single value for 1988 (sample data) I end up with two values after drilling down (example below using whole data set and the formula "Count(IF([Submittal Date]=Aggr(Max([Submittal Date]), [Sensor ID]), [Sensor ID]))" that is miscalculating). I assume&amp;nbsp;that I need a TOTAL or {1} somewhere to correct this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="most recent q.png" style="width: 589px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37655i08B4295725EDE765/image-dimensions/589x200?v=v2" width="589" height="200" role="button" title="most recent q.png" alt="most recent q.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="most recent qd.png" style="width: 591px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37657i2A2F0B125107E015/image-dimensions/591x200?v=v2" width="591" height="200" role="button" title="most recent qd.png" alt="most recent qd.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you for the help.&lt;/P&gt;&lt;P&gt;I have updated this post with a sample of the data set. Doing a set analysis on the 'Flag' data field should synthetically generate the results I am looking for.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:21:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1728622#M55553</guid>
      <dc:creator>epar5lcd</dc:creator>
      <dc:date>2024-11-16T18:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1728656#M55558</link>
      <description>&lt;P&gt;try below measure for&amp;nbsp;&amp;nbsp;[Submittal Date]&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=if([Submittal Date] =
max(total &amp;lt;[Sensor ID]&amp;gt; {&amp;lt;Milestone={'IN'}&amp;gt;}aggr(max({&amp;lt;Milestone={'IN'}&amp;gt;}[Submittal Date]),[Sensor ID],[Event ID])),[Submittal Date],0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;check below option in chart&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-07-17 004305.png" style="width: 200px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37583iDDF8C1C598845335/image-size/small?v=v2&amp;amp;px=200" role="button" title="Annotation 2020-07-17 004305.png" alt="Annotation 2020-07-17 004305.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotation 2020-07-17 004330.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37585iE492B30EDE49AD6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Annotation 2020-07-17 004330.png" alt="Annotation 2020-07-17 004330.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 23:47:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1728656#M55558</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-16T23:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1728886#M55570</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;, thank you for the suggestion. I tried your formula but it does not give me the desired results, I updated my initial post to provide more clarity in what my objectives are. Specifically I am trying&amp;nbsp; to create a Bar Chart, the Table Data would be a reflection of how the data set is transformed based on user selection.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 16:00:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1728886#M55570</guid>
      <dc:creator>epar5lcd</dc:creator>
      <dc:date>2020-07-17T16:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1728931#M55574</link>
      <description>&lt;P&gt;Can you tell me what should be the output based on your above data in&amp;nbsp; post meanwhile try below&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count(aggr(IF([Submittal Date]= Max(t&lt;STRONG&gt;otal &amp;lt;YearMonth&amp;gt;&lt;/STRONG&gt;[Submittal Date]), [Sensor ID]),&amp;nbsp;[Sensor ID],YearMonth&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 21:19:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1728931#M55574</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-17T21:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1729306#M55613</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I tried your most recent suggestion but that does not appear to work either. My desired output is a bar chart. The image below reflects results using the small sample data I provided above. Red bars are my objective, blue bars included for reference.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="most recent t .png" style="width: 744px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37724iAE2F682BA0349362/image-dimensions/744x225?v=v2" width="744" height="225" role="button" title="most recent t .png" alt="most recent t .png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;For this example I am using the autocalendar so you can easily replicate the results (in my working app I use a scripted master calendar). The dimension is a drill down from&amp;nbsp;[Submittal Date.autoCalendar.Year] to [Submittal Date.autoCalendar.YearMonth]. Blue Measure is simply&amp;nbsp;Count({&amp;lt;Milestone={'IN'}&amp;gt;}[Sensor ID]). Red Measure SHOULD count the Max (most recent) date a report came 'IN' for each sensor. The sum total of the red measure count should be equal to the count of distinct sensors (10). Looking at the data, two reports were received in 1987 but only Sensor A's most recent report is counted ('OUT' milestones are ignored) . Sensor E is the only one with a most recent report in 1988. The logic should be that if Sensor E reports again in a future year, say 1990, that count would move out of 1988 and into 1990. This give a picture of what sensors are no longer reporting while active sensors should all have reports in the current year.&lt;/P&gt;&lt;P&gt;Drilling down into 1988 there should still only be one value for the red measure, sensor E's report.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="most recent t2 .png" style="width: 742px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/37727iB11FAF73033826C4/image-dimensions/742x187?v=v2" width="742" height="187" role="button" title="most recent t2 .png" alt="most recent t2 .png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I hope this makes the problem clearer.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 17:19:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1729306#M55613</guid>
      <dc:creator>epar5lcd</dc:creator>
      <dc:date>2020-07-20T17:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1729989#M55668</link>
      <description>&lt;P&gt;I have been working on logically identifying the values I am looking for. I found that the following statement flags the correct number of sensors and most recent dates but I am not able to apply Count() due to nesting restrictions.&lt;/P&gt;&lt;P&gt;IF([Submittal Date]=Max(TOTAL&amp;lt;[Sensor ID]&amp;gt;{&amp;lt;[Milestone]={'IN'}&amp;gt;}[Submittal Date]),1)&lt;/P&gt;&lt;P&gt;In the process I discovered something about the data set I was not aware of. Certain events can generate multiple reports on the same day. Part of the issue is on how to handle these reports when they happen to be the most recent received.&amp;nbsp;This creates a need for a report&amp;nbsp;hierarchy so that the most important report in a group is selected over the rest.&lt;/P&gt;&lt;P&gt;The next equation provides correct total counts for my bar chart but the Submittal Dates that are selected are not consistently the most recent. I even substituted Max() for Min() and get the same results.&lt;/P&gt;&lt;P&gt;Count(Aggr(Max(TOTAL&amp;lt;[Sensor ID]&amp;gt;{&amp;lt;[Milestone]={'IN'}&amp;gt;}[Submittal Date]), [Sensor ID]))&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 16:22:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1729989#M55668</guid>
      <dc:creator>epar5lcd</dc:creator>
      <dc:date>2020-07-22T16:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730063#M55671</link>
      <description>&lt;P&gt;try below&lt;/P&gt;&lt;P&gt;Count({&amp;lt;[Milestone]={'IN'}&amp;gt;}aggr(IF([Submittal Date]=Max(TOTAL&amp;lt;[Sensor ID]&amp;gt;{&amp;lt;[Milestone]={'IN'}&amp;gt;}[Submittal Date]),[Sensor ID]),[Sensor ID]))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;Count({&amp;lt;[Milestone]={'IN'}&amp;gt;}aggr(IF([Submittal Date]=Max(TOTAL&amp;lt;[Sensor ID]&amp;gt;{&amp;lt;[Milestone]={'IN'}&amp;gt;}[Submittal Date]),[Sensor ID]),[Sensor ID],[Submittal Date]))&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2020 21:47:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730063#M55671</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-22T21:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730664#M55724</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks you for your continues suggestions. Still no luck. Both formulas you provided are under reporting the suggested value. I updated my original post to include an attachment of the data set. If you do a set analysis on the 'Flag' field you should be able to synthetically generate the results.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 14:23:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730664#M55724</guid>
      <dc:creator>epar5lcd</dc:creator>
      <dc:date>2020-07-24T14:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730693#M55731</link>
      <description>&lt;P&gt;Can you also tell me expected output for one example? Like for particular year what should be the latest submit date and counts?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 15:36:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730693#M55731</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-24T15:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730699#M55733</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;, the challenge is that the expected output is a function of the whole data set. So if a sensor last reported in 1990, I would expect a 'LAST' count of 1 for that year. But if that same sensor reports today, that original 'LAST' count allocated to 1990 is no longer valid. I would expect the 'LAST' count of 1 for that sensor to now appear in the current year.&lt;/P&gt;&lt;P&gt;If you were to pick a subset of the whole data set I provided, say between the years 2000 to 2005, the majority of 'LAST' counts would be in 2005. Does this make sense?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 15:52:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730699#M55733</guid>
      <dc:creator>epar5lcd</dc:creator>
      <dc:date>2020-07-24T15:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730707#M55735</link>
      <description>&lt;P&gt;Yes. But there will be some logic and of course some number to validate the count right? So for example in year 1988 as per your image of bar chart how number 1 came?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 16:16:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730707#M55735</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-24T16:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730711#M55737</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&lt;/P&gt;&lt;P&gt;I was just retesting and actually the second equation is almost there, there must have been an issue with the data reload when I created 'DUAL' for [Report].&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count({&amp;lt;[Milestone]={'IN'}&amp;gt;}aggr(IF([Submittal Date]=Max(TOTAL&amp;lt;[Sensor ID]&amp;gt;{&amp;lt;[Milestone]={'IN'}&amp;gt;}[Submittal Date]),[Sensor ID]),[Sensor ID],[Submittal Date])).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It is accurately selecting for 'LAST', the issue now is on the drill down. When filtering by year, expected values should still be for 'LAST' of the whole data set, not 'LAST' for that year.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 16:24:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730711#M55737</guid>
      <dc:creator>epar5lcd</dc:creator>
      <dc:date>2020-07-24T16:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730753#M55744</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;, figures below show how your second equation (EQ2) generates the desired output. Bars in green are from my results calculated outside of Qlik and red is your equation (keep in mind I am using my custom calendar so your results might look a little different using standard Qlik calendar). On the first chart the total count for 1989 is 9.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EQ2 total DS.png" style="width: 800px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/38053iD55FB37B571857F9/image-dimensions/800x252?v=v2" width="800" height="252" role="button" title="EQ2 total DS.png" alt="EQ2 total DS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Once drilled in, output numbers are wrong. Expected for the 1989 season should still be 9, EQ2 calculates 59. I know this is because it is recalculating 'LAST' for this specific season, but it should still be 'LAST' for the whole data set. I have been experimenting with placing&amp;nbsp; {1} to force analysis on the full set of all the records in the application, irrespective of any selections made but haven't had any luck.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EQ2 1989 DS.png" style="width: 801px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/38054i8112B0722833C3F2/image-dimensions/801x251?v=v2" width="801" height="251" role="button" title="EQ2 1989 DS.png" alt="EQ2 1989 DS.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your continued engagement.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 19:25:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730753#M55744</guid>
      <dc:creator>epar5lcd</dc:creator>
      <dc:date>2020-07-24T19:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730765#M55745</link>
      <description>&lt;P&gt;When you say drill down what are the selections you are selecting? Do you want that chart to be static and not to affect by any filter?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 20:53:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730765#M55745</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-24T20:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730771#M55748</link>
      <description>&lt;P&gt;meanwhile can you also try script approach&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Data:
LOAD
    "Tower ID",
    "Sensor ID",
    "Event ID",
    Report,
    Milestone,
    "Submittal Date"
FROM [lib://Data/Qlik Sample Data.xlsx]
(ooxml, embedded labels, table is Submittals);

Left Join(Data)
Load  "Sensor ID",
      date(max("Submittal Date")) as "Submittal Date",
      1 as Sensor_Flag
Resident Data
where Milestone ='IN'
Group by "Sensor ID";

Then you can use below expressio in chart
=sum(Sensor_Flag)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 24 Jul 2020 22:14:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730771#M55748</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-24T22:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730773#M55749</link>
      <description>&lt;P&gt;Expression will be below&lt;/P&gt;&lt;P&gt;Count({&amp;lt;[Milestone]={'IN'},&lt;STRONG&gt;Year&lt;/STRONG&gt;&amp;gt;}aggr(IF([Submittal Date]=&lt;BR /&gt;Max(TOTAL&amp;lt;[Sensor ID]&amp;gt;{&amp;lt;&lt;STRONG&gt;Year&lt;/STRONG&gt;,[Milestone]={'IN'}&amp;gt;}[Submittal Date]),[Sensor ID]),[Sensor ID],[Submittal Date]))&lt;STRONG&gt;*avg(1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Also make sure that you have uncheck option of "Include-zero values" in graph&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jul 2020 22:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1730773#M55749</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-24T22:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Date Dimension with Most Recent Received as Measure</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1731038#M55769</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;that is the solution.&amp;nbsp; I don't think I would have ever arrived at it on my own, your help has been invaluable.&lt;/P&gt;&lt;P&gt;I have not attempted to do many scripted solutions in Qlik. Would the script still work if there is an external data connection that is pushing updated data to the app?&lt;/P&gt;&lt;P&gt;Thanks once again.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 12:47:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-Chart-Date-Dimension-with-Most-Recent-Received-as-Measure/m-p/1731038#M55769</guid>
      <dc:creator>epar5lcd</dc:creator>
      <dc:date>2020-07-27T12:47:21Z</dc:date>
    </item>
  </channel>
</rss>

