<?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 nº dimension values based on the dimension values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-n%C2%BA-dimension-values-based-on-the-dimension-values/m-p/1558845#M441105</link>
    <description>&lt;P&gt;This is what I've done, hope it helps someone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MinFechaBaja:&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Min(Cl_FechaDesdeYear) as MinimaFecha&lt;BR /&gt;Resident CRM_Cuenta;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;let vFechaMin = Peek('MinimaFecha',-1,'MinimaFecha');&lt;BR /&gt;let vFechaMax = year(Today());&lt;/P&gt;&lt;P&gt;FOR vFechaActual = $(vFechaMin) to $(vFechaMax)&lt;BR /&gt;&amp;nbsp; if $(vFechaActual) = $(vFechaMin) then&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CRM_HistorialCuentasActivas:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Cl_NombreCliente as HCA_Cliente,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; $(vFechaActual) as HCA_Año,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 1 as HCA_Contador&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Resident CRM_Cuenta&lt;BR /&gt;&amp;nbsp; &amp;nbsp; where (Cl_FechaDesdeYear&amp;lt;=$(vFechaActual) and Cl_FechaHastaYear&amp;gt;=$(vFechaActual)) or (Cl_FechaDesdeYear&amp;lt;=$(vFechaActual) and isnull(Cl_FechaHasta_tmp));&lt;BR /&gt;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Concatenate (CRM_HistorialCuentasActivas)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Cl_NombreCliente as HCA_Cliente,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; $(vFechaActual) as HCA_Año,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 1 as HCA_Contador&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Resident CRM_Cuenta&lt;BR /&gt;&amp;nbsp; &amp;nbsp; where (Cl_FechaDesdeYear&amp;lt;=$(vFechaActual) and Cl_FechaHastaYear&amp;gt;=$(vFechaActual)) or (Cl_FechaDesdeYear&amp;lt;=$(vFechaActual) and isnull(Cl_FechaHasta_tmp));&lt;BR /&gt;&amp;nbsp; end if&lt;BR /&gt;next&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2019 09:48:41 GMT</pubDate>
    <dc:creator>arngue</dc:creator>
    <dc:date>2019-03-20T09:48:41Z</dc:date>
    <item>
      <title>Count nº dimension values based on the dimension values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-n%C2%BA-dimension-values-based-on-the-dimension-values/m-p/1558581#M441088</link>
      <description>&lt;P&gt;I need to count how many PK were active in a date.&lt;/P&gt;&lt;P&gt;I have a data table with the year that a customer withdraw.&lt;/P&gt;&lt;P&gt;I need to count how many customers were active on a year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to represent this as a Line Chart. Dimension is Year, Expression is count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;count(distinct PK) + count(distinct &amp;lt;{Year&amp;gt;Year}&amp;gt; PK) + count(distinct &amp;lt;{Year=null()}&amp;gt; PK)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Count(distinct PK) - counts how many customers withdrawn in the dimension year&lt;/P&gt;&lt;P&gt;Count(distinct &amp;lt;{Year &amp;gt; Year}&amp;gt; PK) -&amp;nbsp; counts how many customers withdrawn in future of the dimension year&lt;/P&gt;&lt;P&gt;Count(distinct &amp;lt;{Year = null()}&amp;gt; PK) - counts how many customers never been withdrawn.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any way to acomplish that? I'm getting insane.&lt;/P&gt;&lt;P&gt;Do i have to accomplish that in the Load script?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:06:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-n%C2%BA-dimension-values-based-on-the-dimension-values/m-p/1558581#M441088</guid>
      <dc:creator>arngue</dc:creator>
      <dc:date>2024-11-16T04:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count nº dimension values based on the dimension values</title>
      <link>https://community.qlik.com/t5/QlikView/Count-n%C2%BA-dimension-values-based-on-the-dimension-values/m-p/1558845#M441105</link>
      <description>&lt;P&gt;This is what I've done, hope it helps someone:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MinFechaBaja:&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Min(Cl_FechaDesdeYear) as MinimaFecha&lt;BR /&gt;Resident CRM_Cuenta;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;let vFechaMin = Peek('MinimaFecha',-1,'MinimaFecha');&lt;BR /&gt;let vFechaMax = year(Today());&lt;/P&gt;&lt;P&gt;FOR vFechaActual = $(vFechaMin) to $(vFechaMax)&lt;BR /&gt;&amp;nbsp; if $(vFechaActual) = $(vFechaMin) then&lt;BR /&gt;&amp;nbsp; &amp;nbsp; CRM_HistorialCuentasActivas:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Cl_NombreCliente as HCA_Cliente,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; $(vFechaActual) as HCA_Año,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 1 as HCA_Contador&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Resident CRM_Cuenta&lt;BR /&gt;&amp;nbsp; &amp;nbsp; where (Cl_FechaDesdeYear&amp;lt;=$(vFechaActual) and Cl_FechaHastaYear&amp;gt;=$(vFechaActual)) or (Cl_FechaDesdeYear&amp;lt;=$(vFechaActual) and isnull(Cl_FechaHasta_tmp));&lt;BR /&gt;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Concatenate (CRM_HistorialCuentasActivas)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Load&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Cl_NombreCliente as HCA_Cliente,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; $(vFechaActual) as HCA_Año,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 1 as HCA_Contador&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Resident CRM_Cuenta&lt;BR /&gt;&amp;nbsp; &amp;nbsp; where (Cl_FechaDesdeYear&amp;lt;=$(vFechaActual) and Cl_FechaHastaYear&amp;gt;=$(vFechaActual)) or (Cl_FechaDesdeYear&amp;lt;=$(vFechaActual) and isnull(Cl_FechaHasta_tmp));&lt;BR /&gt;&amp;nbsp; end if&lt;BR /&gt;next&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 09:48:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-n%C2%BA-dimension-values-based-on-the-dimension-values/m-p/1558845#M441105</guid>
      <dc:creator>arngue</dc:creator>
      <dc:date>2019-03-20T09:48:41Z</dc:date>
    </item>
  </channel>
</rss>

