<?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 how to get previous date selection in list box upon selection of current date in another list box in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1989400#M81771</link>
    <description>&lt;P&gt;I have to create two tables and data between them are associated based on posting date.&lt;/P&gt;
&lt;P&gt;Also have two list box filters which are current date and previous date. for previous date in list box only I am using date (posting date -1)&lt;/P&gt;
&lt;P&gt;Now requirement is like if user selects current date, previous date list box filter date should show previous date.&lt;/P&gt;
&lt;P&gt;Please suggest how to achieve this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2022 07:23:23 GMT</pubDate>
    <dc:creator>abc_18</dc:creator>
    <dc:date>2022-10-06T07:23:23Z</dc:date>
    <item>
      <title>how to get previous date selection in list box upon selection of current date in another list box</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1989400#M81771</link>
      <description>&lt;P&gt;I have to create two tables and data between them are associated based on posting date.&lt;/P&gt;
&lt;P&gt;Also have two list box filters which are current date and previous date. for previous date in list box only I am using date (posting date -1)&lt;/P&gt;
&lt;P&gt;Now requirement is like if user selects current date, previous date list box filter date should show previous date.&lt;/P&gt;
&lt;P&gt;Please suggest how to achieve this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 07:23:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1989400#M81771</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2022-10-06T07:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to get previous date selection in list box upon selection of current date in another list box</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1989455#M81779</link>
      <description>&lt;P&gt;Hi, you will need another field to filter previous date, this field can be created in script, in the same table where posting date is as "Date([Posting Date]-1) as Previous Date.&lt;/P&gt;
&lt;P&gt;If for some reason you need the same you will need to use altern staes so the selctions in one field don't affect the other but this will complicate all expressions.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 09:03:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1989455#M81779</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-10-06T09:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to get previous date selection in list box upon selection of current date in another list box</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1992162#M82094</link>
      <description>&lt;P&gt;Hi Ruben,&lt;/P&gt;
&lt;P&gt;Thanks for the response.&lt;/P&gt;
&lt;P&gt;I had tried creating a new field in script as previous date.&lt;/P&gt;
&lt;P&gt;Now the issue I am facing is that upon selection of current date , previous date values are not changing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 08:33:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1992162#M82094</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2022-10-13T08:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to get previous date selection in list box upon selection of current date in another list box</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1992208#M82099</link>
      <description>&lt;P&gt;Hi, something should be different, if PreviosDate is created in the same table as posting date, and it's always substracting one from the posting date, there should be only one previous date for each posting date.&lt;/P&gt;
&lt;P&gt;Other question is the use you can give to this fields, because having a field than just shows the previous day of the posting date I'm not sure what kind of use will have.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 09:56:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1992208#M82099</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-10-13T09:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to get previous date selection in list box upon selection of current date in another list box</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1992333#M82117</link>
      <description>&lt;P&gt;Hi Ruben,&lt;/P&gt;
&lt;P&gt;Previous date is working now, thanks.&lt;/P&gt;
&lt;P&gt;Posting date was just an example &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; actual date field is DT.date.&lt;/P&gt;
&lt;P&gt;can you please help me with pick match function for this expression below.&lt;/P&gt;
&lt;P&gt;Currently I am using expression in table box to get the current date based value&lt;/P&gt;
&lt;P&gt;sum(aggr(&lt;BR /&gt;pick(match(measure,'XYZ','ABC','DEF'),&lt;BR /&gt;Sum({$&amp;lt;[DT.Date]={"$(=DATE(([DT.Date])))"}&amp;gt;} count_XYZ),&lt;BR /&gt;sum( {$&amp;lt;[DT.Date]={"$(=DATE(([DT.Date])))"}&amp;gt;}count_ABC),&lt;BR /&gt;sum({$&amp;lt;[DT.Date]={"$(=DATE(([DT.Date])))"}&amp;gt;}count_DEF))&lt;BR /&gt;,measure,DT.Date))&lt;/P&gt;
&lt;P&gt;But the issue is like every time I have to select the measure to get the value in table for that particular measure but the expectation is to get an expanded value for all the measures.&lt;/P&gt;
&lt;P&gt;expectation:'&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abc_18_2-1665668529035.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91247iAE655DF33B47CCBF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abc_18_2-1665668529035.png" alt="abc_18_2-1665668529035.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But I am getting data in table like below only for selected measure&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abc_18_1-1665668466808.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/91245i72F44470B40557E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abc_18_1-1665668466808.png" alt="abc_18_1-1665668466808.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Can you please help me with this, in case I need to make any change in the expression.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 13:50:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1992333#M82117</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2022-10-13T13:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to get previous date selection in list box upon selection of current date in another list box</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1992386#M82120</link>
      <description>&lt;P&gt;Hi, this has stepped up in difficulty.&lt;/P&gt;
&lt;P&gt;First, I don't know if you are trying that set analysis iterates by date but it doesn't works that way. Before any calculation the $-expansion is evaluated, so it will have only one value, it's not calcualted row by row or by the dimension of the aggr.&lt;/P&gt;
&lt;P&gt;And if there is more than one possible date it will return null. &lt;SPAN&gt;$(=DATE(Max([DT.Date]))) will return a date, but it will be the same for all iterations/rows.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also I'm not sure of the logic, by the syntax it looks like any row can have more than one measure and date, and for each date and measure it sums a different field, and all them are finally summed up.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I think this is really messy and needs a rethink (or maybe a better explanation).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 15:45:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1992386#M82120</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-10-13T15:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to get previous date selection in list box upon selection of current date in another list box</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1993706#M82240</link>
      <description>&lt;P&gt;Hi Ruben,&lt;/P&gt;
&lt;P&gt;Yeah you are right, aggr function was not being used in right place, I have changed the expression and it's working now for &lt;STRONG&gt;Current date&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;I have below expression for the current date column which is working, have to calculate previous date for another column.&lt;/P&gt;
&lt;P&gt;=sum(if(DT.Date = aggr(nodistinct max(DT.Date),measure),qty))&lt;/P&gt;
&lt;P&gt;I tried using below expression for previous date but it's not working , c&lt;SPAN&gt;an you please help me with the correct way?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=sum(if(DT.Date = aggr(nodistinct date(max(DT.Date)-1,'MM/DD/YYYY'),measure),qty))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 06:35:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1993706#M82240</guid>
      <dc:creator>abc_18</dc:creator>
      <dc:date>2022-10-18T06:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to get previous date selection in list box upon selection of current date in another list box</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1993843#M82250</link>
      <description>&lt;P&gt;Hi, maybe the aggr needs a TOTAL to ignore the current dimension date, and for this it will need to be included in a aggregation function, and then DT.Date should be added to the aggr parameters, and maybe it needs something more on the Max() function. But this is hard to follow, to give a complete answer I will need a sample app to make some tests.&lt;/P&gt;
&lt;P&gt;Just guessing:&amp;nbsp;&lt;SPAN&gt;=sum(if(DT.Date = Avg(TOTAL aggr(nodistinct date(max(DT.Date)-1,'MM/DD/YYYY'),measure)),qty))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 10:43:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-get-previous-date-selection-in-list-box-upon-selection-of/m-p/1993843#M82250</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-10-18T10:43:57Z</dc:date>
    </item>
  </channel>
</rss>

