<?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: DAX subtotal sum in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-subtotal-sum/m-p/1936276#M42120</link>
    <description>&lt;P&gt;Yeah... Writing DAX the way you do... is a sure way to not understand what it does. DAX which is not correctly formatted is not DAX.&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/rules-for-dax-code-formatting/" target="_blank" rel="noopener"&gt;Rules for DAX Code Formatting - SQLBI&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;By the way, using nested IF's is not elegant. There's a better way: &lt;A href="https://dax.guide/switch" target="_blank" rel="noopener"&gt;SWITCH&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After two days nobody has even tried to reply to your post. Guess why.&lt;/P&gt;</description>
    <pubDate>Sat, 03 Jul 2021 19:52:43 GMT</pubDate>
    <dc:creator>daxer-almighty</dc:creator>
    <dc:date>2021-07-03T19:52:43Z</dc:date>
    <item>
      <title>DAX subtotal sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-subtotal-sum/m-p/1933249#M41991</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having problems trying to come up with a subtotal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following measure:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M_IMPACTO_ECONOMICO = calculate([M_IMPACTO_FINAL], VALORACIONES[IMPACT_CAT] = "001")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M_IMPACTO_FINAL = if(firstnonblank(IMPACTO[IMPACTO],1) = "PONDERADO",[M_IMPACTO_PONDERADO],[M_IMPACTO_SIMPLE])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M_IMPACTO_PONDERADO = if(isinscope(PESOS[REGION]), [M_IMPACTO]*[M_PERCENT], sumx(values(PESOS[REGION]), [M_IMPACTO]*[M_PERCENT]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;M_IMPACTO = VAR valoraciones_count = addcolumns(valoraciones, "@Count", countrows(relatedTable(ZRIESGOS_AMPLIADA))) VAR _num = sumx(valoraciones_count, VALORACIONES[QUAL_IMPACT]*[@Count]) VAR _den = sumx(valoraciones_count, [@Count]) VAR _res = divide(_num, _den) return _res&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The problem I am having is that it does an operation that I cannot understand in the subtotal of a table:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;How could I get the sum of the values? It should be 12,48.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 13:11:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-subtotal-sum/m-p/1933249#M41991</guid>
      <dc:creator>mizaskun</dc:creator>
      <dc:date>2021-07-01T13:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: DAX subtotal sum</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-subtotal-sum/m-p/1936276#M42120</link>
      <description>&lt;P&gt;Yeah... Writing DAX the way you do... is a sure way to not understand what it does. DAX which is not correctly formatted is not DAX.&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/rules-for-dax-code-formatting/" target="_blank" rel="noopener"&gt;Rules for DAX Code Formatting - SQLBI&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;By the way, using nested IF's is not elegant. There's a better way: &lt;A href="https://dax.guide/switch" target="_blank" rel="noopener"&gt;SWITCH&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After two days nobody has even tried to reply to your post. Guess why.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jul 2021 19:52:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-subtotal-sum/m-p/1936276#M42120</guid>
      <dc:creator>daxer-almighty</dc:creator>
      <dc:date>2021-07-03T19:52:43Z</dc:date>
    </item>
  </channel>
</rss>

