<?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: Count if Date in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-if-Date/m-p/1864793#M71379</link>
    <description>&lt;P&gt;Ho Mario, el If debería ir dentro del count:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count(if([Fecha Vencimiento] &amp;lt; max(Fecha), [No. Pedido]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Aunque te drá un error de que el max no se puede usar en un count, lo que te obliga a añadir un aggr:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count(Aggr(if([Fecha Vencimiento] &amp;lt; max(Fecha), [No. Pedido])),[No. Pedido])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;O calcular el Max como algo global, no línea a línea, esto se puede hver usando una variable o $-expansion:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count(if([Fecha Vencimiento] &amp;lt; $(=max(Fecha)), [No. Pedido]))&lt;/LI-CODE&gt;
&lt;P&gt;Y por último tienes la versión con set analysis:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;[Fecha Vencimiento]={"&amp;lt;$(=max(Fecha))"}&amp;gt;} [No. Pedido])

Puede que necesites formatear la fecha:
Count({&amp;lt;[Fecha Vencimiento]={"&amp;lt;$(=Date(max(Fecha)))"}&amp;gt;} [No. Pedido])&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 30 Nov 2021 09:40:44 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2021-11-30T09:40:44Z</dc:date>
    <item>
      <title>Count if Date</title>
      <link>https://community.qlik.com/t5/App-Development/Count-if-Date/m-p/1864779#M71378</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I'm trying to create a KPI that counts the total number of orders that have expired.&lt;/P&gt;
&lt;P&gt;To do this I have the fields "due date", date and Order Number.&lt;/P&gt;
&lt;P&gt;The date format is 'DD/MM/YYYY' for both fields.&lt;/P&gt;
&lt;P&gt;So far I have created this formula:&lt;/P&gt;
&lt;P&gt;if([Fecha Vencimiento] &amp;lt; max(Fecha)), Count([No. Pedido]))&lt;/P&gt;
&lt;P&gt;But I don't get any number.&lt;/P&gt;
&lt;P&gt;Can you help me, please!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 09:00:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-if-Date/m-p/1864779#M71378</guid>
      <dc:creator>Mario_ES</dc:creator>
      <dc:date>2021-11-30T09:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Count if Date</title>
      <link>https://community.qlik.com/t5/App-Development/Count-if-Date/m-p/1864793#M71379</link>
      <description>&lt;P&gt;Ho Mario, el If debería ir dentro del count:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count(if([Fecha Vencimiento] &amp;lt; max(Fecha), [No. Pedido]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Aunque te drá un error de que el max no se puede usar en un count, lo que te obliga a añadir un aggr:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count(Aggr(if([Fecha Vencimiento] &amp;lt; max(Fecha), [No. Pedido])),[No. Pedido])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;O calcular el Max como algo global, no línea a línea, esto se puede hver usando una variable o $-expansion:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count(if([Fecha Vencimiento] &amp;lt; $(=max(Fecha)), [No. Pedido]))&lt;/LI-CODE&gt;
&lt;P&gt;Y por último tienes la versión con set analysis:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;[Fecha Vencimiento]={"&amp;lt;$(=max(Fecha))"}&amp;gt;} [No. Pedido])

Puede que necesites formatear la fecha:
Count({&amp;lt;[Fecha Vencimiento]={"&amp;lt;$(=Date(max(Fecha)))"}&amp;gt;} [No. Pedido])&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 30 Nov 2021 09:40:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-if-Date/m-p/1864793#M71379</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2021-11-30T09:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count if Date</title>
      <link>https://community.qlik.com/t5/App-Development/Count-if-Date/m-p/1864846#M71383</link>
      <description>&lt;P&gt;Muchas gracias, Rubén!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 11:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-if-Date/m-p/1864846#M71383</guid>
      <dc:creator>Mario_ES</dc:creator>
      <dc:date>2021-11-30T11:31:47Z</dc:date>
    </item>
  </channel>
</rss>

