<?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: Countries or countx returning blank total but row by row ok. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countries-or-countx-returning-blank-total-but-row-by-row-ok/m-p/2615110#M75952</link>
    <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="349626" data-lia-user-login="jlayala" class="lia-mention lia-mention-user"&gt;jlayala&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Usuario Nuevo Registrados =
SUMX (
    TableName,
    CALCULATE (
        VAR fecha =
            SELECTEDVALUE ( 'paynom usuarios'[created_at] )
        VAR Fecha_min =
            EOMONTH ( fecha, -1 )
        VAR Fecha_max =
            EOMONTH ( fecha, 0 )
        VAR tabla_filtro =
            FILTER (
                ADDCOLUMNS (
                    'paynom usuarios',
                    "@Fecha_min", Fecha_min,
                    "@Fecha_max", Fecha_max
                ),
                fecha &amp;gt; Fecha_min
                    &amp;amp;&amp;amp; fecha &amp;lt;= Fecha_max
                    &amp;amp;&amp;amp; 'paynom usuarios'[rol_id] = 3
                    &amp;amp;&amp;amp; 'paynom usuarios'[registrado] = TRUE ()
            )
        VAR CONTEO_USUARIOS_NUEVOS =
            COUNTX ( tabla_filtro, 'paynom usuarios'[username] )
        RETURN
            COUNTROWS ( tabla_filtro )
    )
)&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 02 Jul 2022 07:00:41 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-07-02T07:00:41Z</dc:date>
    <item>
      <title>Countries or countx returning blank total but row by row ok.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countries-or-countx-returning-blank-total-but-row-by-row-ok/m-p/2614952#M75944</link>
      <description>&lt;P&gt;Hi everyone, hope can someone help me.&lt;/P&gt;&lt;P&gt;I have a table that one measure ("usuario nuevo registrados") do not gives me the total. All measures use the same table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the card show blank as total is in the table.&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;LI-CODE lang="markup"&gt;Usuario Nuevo Registrados = 
VAR fecha =
    SELECTEDVALUE ( 'paynom usuarios'[created_at] )
VAR Fecha_min =
    EOMONTH ( fecha, -1 )
VAR Fecha_max =
    EOMONTH ( fecha, 0 )
VAR tabla_filtro =
    FILTER (
        ADDCOLUMNS (
            'paynom usuarios',
            "@Fecha_min", Fecha_min,
            "@Fecha_max", Fecha_max
        ),
        fecha &amp;gt; Fecha_min
            &amp;amp;&amp;amp; fecha &amp;lt;= Fecha_max
            &amp;amp;&amp;amp; 'paynom usuarios'[rol_id] = 3
            &amp;amp;&amp;amp; 'paynom usuarios'[registrado] = TRUE()
    )
VAR CONTEO_USUARIOS_NUEVOS = 
    COUNTX ( 
        tabla_filtro,
        'paynom usuarios'[username] 
    )
RETURN
COUNTROWS( tabla_filtro)&lt;/LI-CODE&gt;&lt;DIV&gt;the other measure is more simple&amp;nbsp;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;Usuario Registrado = calculate ( 
    COUNTROWS( 'paynom usuarios') ,
        'paynom usuarios'[registrado] = TRUE() ,
        'paynom roles'[name] = "employee"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jul 2022 21:54:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countries-or-countx-returning-blank-total-but-row-by-row-ok/m-p/2614952#M75944</guid>
      <dc:creator>jlayala</dc:creator>
      <dc:date>2022-07-01T21:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Countries or countx returning blank total but row by row ok.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countries-or-countx-returning-blank-total-but-row-by-row-ok/m-p/2615110#M75952</link>
      <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="349626" data-lia-user-login="jlayala" class="lia-mention lia-mention-user"&gt;jlayala&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Usuario Nuevo Registrados =
SUMX (
    TableName,
    CALCULATE (
        VAR fecha =
            SELECTEDVALUE ( 'paynom usuarios'[created_at] )
        VAR Fecha_min =
            EOMONTH ( fecha, -1 )
        VAR Fecha_max =
            EOMONTH ( fecha, 0 )
        VAR tabla_filtro =
            FILTER (
                ADDCOLUMNS (
                    'paynom usuarios',
                    "@Fecha_min", Fecha_min,
                    "@Fecha_max", Fecha_max
                ),
                fecha &amp;gt; Fecha_min
                    &amp;amp;&amp;amp; fecha &amp;lt;= Fecha_max
                    &amp;amp;&amp;amp; 'paynom usuarios'[rol_id] = 3
                    &amp;amp;&amp;amp; 'paynom usuarios'[registrado] = TRUE ()
            )
        VAR CONTEO_USUARIOS_NUEVOS =
            COUNTX ( tabla_filtro, 'paynom usuarios'[username] )
        RETURN
            COUNTROWS ( tabla_filtro )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 02 Jul 2022 07:00:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countries-or-countx-returning-blank-total-but-row-by-row-ok/m-p/2615110#M75952</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-02T07:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Countries or countx returning blank total but row by row ok.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countries-or-countx-returning-blank-total-but-row-by-row-ok/m-p/2620151#M76278</link>
      <description>&lt;P&gt;It works! Thanks. &amp;nbsp;What would be the reason ? is it the aggregate function?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 14:27:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countries-or-countx-returning-blank-total-but-row-by-row-ok/m-p/2620151#M76278</guid>
      <dc:creator>jlayala</dc:creator>
      <dc:date>2022-07-05T14:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Countries or countx returning blank total but row by row ok.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countries-or-countx-returning-blank-total-but-row-by-row-ok/m-p/2620167#M76279</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="349626" data-lia-user-login="jlayala" class="lia-mention lia-mention-user"&gt;jlayala&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the reason is SELECTEDVALUE which returns blank in case of multiple values found. Therefore, totals will allways be blank. SUMX restores the lost value by summing the visible values snd aggregate them in the total cell&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 14:35:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countries-or-countx-returning-blank-total-but-row-by-row-ok/m-p/2620167#M76279</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-05T14:35:12Z</dc:date>
    </item>
  </channel>
</rss>

