<?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: Suma de conteo de registros agrupados. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3593445#M138801</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659884" data-lia-user-login="SEAM_98" class="lia-mention lia-mention-user"&gt;SEAM_98&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure 2 = 
var _table=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS],Calendario[Semana del mes],PRUEBA[ENTIDAD],Calendario[Nombre_dia])
var _table2=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS],Calendario[Semana del mes],PRUEBA[ENTIDAD])
var _table3=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS],Calendario[Semana del mes])
var _table4=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS])
var _a=SWITCH(TRUE(),
ISINSCOPE(Calendario[Nombre_dia]),COUNT(PRUEBA[ID]),
ISINSCOPE(PRUEBA[ENTIDAD]),COUNTROWS(FILTER(_table,[Nombre_dia] in VALUES(Calendario[Nombre_dia]))),
ISINSCOPE('Calendario'[Semana del mes]),COUNTROWS(FILTER(_table2,[ENTIDAD] in VALUES(PRUEBA[ENTIDAD]))),
ISINSCOPE(PRUEBA[EJECUTIVO DE VENTAS]),COUNTROWS(FILTER(_table3,[Semana del mes] in VALUES(Calendario[Semana del mes]))),
ISINSCOPE(Calendario[Mes]),COUNTROWS(FILTER(_table4,[EJECUTIVO DE VENTAS] in VALUES('PRUEBA'[EJECUTIVO DE VENTAS]))))
return _a&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2023 10:04:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-12-20T10:04:46Z</dc:date>
    <item>
      <title>Suma de conteo de registros agrupados.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3589984#M138579</link>
      <description>&lt;P&gt;Buenas, tengo un probrema respecto a la visualización de mi cuadro. Yo quiero que se visualice que por día hubo una visita. Sin embargo como el registro se repite 3 veces porque se visito 3 personas distintas en esa entidad, me sale que la visito como 3 veces cuando en realidad fue una visita.&amp;nbsp; Por ejemplo, en la entidad Essalud Sabogal el total deberia salirme como 5 visitas y me sale 15 porque en mi tabla la registraron 15 veces. En realidad por el día deberia salirme una visita y al final en el total por la semana de Essalud sabogal 5 visitas.&amp;nbsp; Intente hacer una medidad de dividir el conteo entre si mismo pero en el total también me bota la unidad y no la suma. No se como hacer porque segun el power bi si hay 15 registros, la visito 15 veces en la semana, cuando en realidad fue 5 veces que visito. Su apoyo por favor.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 22:55:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3589984#M138579</guid>
      <dc:creator>SEAM_98</dc:creator>
      <dc:date>2023-12-18T22:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Suma de conteo de registros agrupados.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3590277#M138597</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659884" data-lia-user-login="SEAM_98" class="lia-mention lia-mention-user"&gt;SEAM_98&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) This is my test data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(2) If you want to display the count of types, create the measure 1.&lt;BR /&gt;If you want to display the value of value, but show the total at the subtotal, create measure 2.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure 1 = COUNT('Table'[Type4])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = IF(ISINSCOPE('Table'[Type4]),SUM('Table'[value]),[Measure 1])&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the above one can't help you get the desired result, please provide some&amp;nbsp;&lt;STRONG&gt;sample data&lt;/STRONG&gt;&amp;nbsp;in your tables (&lt;STRONG&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/STRONG&gt;) with&amp;nbsp;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with backend logic and special examples.&amp;nbsp;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;pbix file.&amp;nbsp;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 02:55:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3590277#M138597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-19T02:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Suma de conteo de registros agrupados.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3591957#M138696</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am attaching my table in order to find a solution. For example,&amp;nbsp; when I create a&amp;nbsp; matrix visualization. It shows that in monday 11th the seller Jennifer visited 4 times. However, it should be only one visit. Please note I made recount of ID in the visualization. As you can see in the visualization, in &lt;STRONG&gt;monday&lt;/STRONG&gt; appears 4 (recount of ID) and I want that shows 1 and &lt;STRONG&gt;Essalud Sabogal&lt;/STRONG&gt; the subtotal 4 instead of 13.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;To explain in monday it shows hours from 8:30 am to 11:00 am and visit 4 people but only went to Essalud Sabogal one time. I want that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sharing with you the data&amp;nbsp;&lt;A href="https://we.tl/t-xocR3oOXzf" target="_blank"&gt;https://we.tl/t-xocR3oOXzf&lt;/A&gt;&amp;nbsp;Remember that it's avalaible only for 7 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 17:07:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3591957#M138696</guid>
      <dc:creator>SEAM_98</dc:creator>
      <dc:date>2023-12-19T17:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Suma de conteo de registros agrupados.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3593445#M138801</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659884" data-lia-user-login="SEAM_98" class="lia-mention lia-mention-user"&gt;SEAM_98&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure 2 = 
var _table=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS],Calendario[Semana del mes],PRUEBA[ENTIDAD],Calendario[Nombre_dia])
var _table2=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS],Calendario[Semana del mes],PRUEBA[ENTIDAD])
var _table3=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS],Calendario[Semana del mes])
var _table4=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS])
var _a=SWITCH(TRUE(),
ISINSCOPE(Calendario[Nombre_dia]),COUNT(PRUEBA[ID]),
ISINSCOPE(PRUEBA[ENTIDAD]),COUNTROWS(FILTER(_table,[Nombre_dia] in VALUES(Calendario[Nombre_dia]))),
ISINSCOPE('Calendario'[Semana del mes]),COUNTROWS(FILTER(_table2,[ENTIDAD] in VALUES(PRUEBA[ENTIDAD]))),
ISINSCOPE(PRUEBA[EJECUTIVO DE VENTAS]),COUNTROWS(FILTER(_table3,[Semana del mes] in VALUES(Calendario[Semana del mes]))),
ISINSCOPE(Calendario[Mes]),COUNTROWS(FILTER(_table4,[EJECUTIVO DE VENTAS] in VALUES('PRUEBA'[EJECUTIVO DE VENTAS]))))
return _a&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 10:04:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3593445#M138801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-20T10:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Suma de conteo de registros agrupados.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3594560#M138865</link>
      <description>&lt;P&gt;Hi friend,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your support. Is possible that is in yellow can be 1 instead of 4?.&amp;nbsp; I made an example from num visit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made the equations:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*month = Seller 1 + Seller 2 + Seller 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Seller 1 (Jennifer Ramirez) = Semana 3 (10) + Semana 4 ()&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;*Semana 3 = Asoni Lab (2) + Clinica Ricardo Palma (1) + Essalud Sabogal (4) + Hospital alcides Carrion (1) + INSN San Borja (2) = 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essalud Sabogal = Lunes (1)&amp;nbsp; + Martes (1) + Miercoles (1) + Jueves (1) = 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lunes = Hour 1 (1)&amp;nbsp; + Hour (1) + ... + Hour (1) = 1&lt;/P&gt;&lt;P&gt;Any day equals to one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Day equals to 1&lt;/P&gt;&lt;P&gt;Entity is the sum of days&lt;/P&gt;&lt;P&gt;Week is the sum of entities&lt;/P&gt;&lt;P&gt;Seller is the sum of weeks&lt;/P&gt;&lt;P&gt;Month is the sum of sellers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I edit an image how could be.&amp;nbsp; Only 2 column with values consider. Please your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 17:35:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3594560#M138865</guid>
      <dc:creator>SEAM_98</dc:creator>
      <dc:date>2023-12-20T17:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Suma de conteo de registros agrupados.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3596259#M138946</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="659884" data-lia-user-login="SEAM_98" class="lia-mention lia-mention-user"&gt;SEAM_98&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can create a measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure 2 = 

var _table=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS],Calendario[Semana del mes],PRUEBA[ENTIDAD],Calendario[Nombre_dia])
var _table2=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS],Calendario[Semana del mes],PRUEBA[ENTIDAD])
var _table3=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS],Calendario[Semana del mes])
var _table4=SUMMARIZE('PRUEBA',Calendario[Mes],'PRUEBA'[EJECUTIVO DE VENTAS])
var _b=COUNTROWS(FILTER(_table,[Nombre_dia] in VALUES(Calendario[Nombre_dia])))

var _a=SWITCH(TRUE(),
ISINSCOPE(PRUEBA[HORA]),COUNT(PRUEBA[ID]),
ISINSCOPE(Calendario[Nombre_dia]),COUNTROWS(FILTER(_table,[Nombre_dia] in VALUES(Calendario[Nombre_dia]))),
ISINSCOPE(PRUEBA[ENTIDAD]),COUNTROWS(FILTER(_table,[Nombre_dia] in VALUES(Calendario[Nombre_dia]))),
ISINSCOPE('Calendario'[Semana del mes]),SUMX(VALUES(Calendario[Semana del mes]),_b),
ISINSCOPE(PRUEBA[EJECUTIVO DE VENTAS]),SUMX(VALUES(PRUEBA[EJECUTIVO DE VENTAS]),_b),
ISINSCOPE(Calendario[Mes]),SUMX(VALUES(Calendario[Mes]),_b))
return _a&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 10:01:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Suma-de-conteo-de-registros-agrupados/m-p/3596259#M138946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-21T10:01:50Z</dc:date>
    </item>
  </channel>
</rss>

