<?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: Problem with division in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-division/m-p/3031857#M103659</link>
    <description>&lt;P&gt;I managed to solve it here. The filters were different. Thank you very much&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jan 2023 15:56:36 GMT</pubDate>
    <dc:creator>Thiagops</dc:creator>
    <dc:date>2023-01-19T15:56:36Z</dc:date>
    <item>
      <title>Problem with division</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-division/m-p/3031155#M103582</link>
      <description>&lt;P&gt;Good Morning,&lt;BR /&gt;Guys I'm trying to do a division, but the result is not correct. Can anyone help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;% de conversão em vendas = DIVIDE(([Total de pedidos faturados]),([Total de cotações digitadas]))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total de cotações digitadas = &lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;PEDIDO_VENDA&lt;/SPAN&gt;&lt;SPAN&gt;[NS_CODIGO]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total de pedidos faturados = &lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;(NF_SAIDA[NS_CODIGO])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;The result should be 83.84% and not 84.48%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 Jan 2023 12:04:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-division/m-p/3031155#M103582</guid>
      <dc:creator>Thiagops</dc:creator>
      <dc:date>2023-01-19T12:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with division</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-division/m-p/3031211#M103585</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="494736" data-lia-user-login="Thiagops" class="lia-mention lia-mention-user"&gt;Thiagops&lt;/a&gt;&lt;/P&gt;&lt;P&gt;It seems your tables are related, try like:&lt;/P&gt;&lt;P&gt;% de conversão em vendas =&lt;BR /&gt;DIVIDE(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; (CALCULATE ( [Total de pedidos faturados], ALL(PEDIDO_VENDA)),&lt;BR /&gt;&amp;nbsp; &amp;nbsp; (CALCULATE ( [Total de cotações digitadas], ALL(NF_SAIDA))&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 12:20:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-division/m-p/3031211#M103585</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-19T12:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with division</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-division/m-p/3031252#M103587</link>
      <description>&lt;P&gt;One possible issue could be that the COUNT function is counting duplicate values in either the PEDIDO_VENDA or NF_SAIDA table. To fix this, you can try using the DISTINCTCOUNT function instead of COUNT. This will only count unique values in the table.&lt;/P&gt;&lt;P&gt;Another possible issue could be that the PEDIDO_VENDA and NF_SAIDA tables have different filters applied, resulting in a different count for each table. To fix this, you can try applying the same filters to both tables before performing the division.&lt;/P&gt;&lt;P&gt;Lastly, you can check for any hidden filters that may be affecting the data.&lt;/P&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;% de conversão em vendas = DIVIDE(DISTINCTCOUNT(NF_SAIDA[NS_CODIGO]), DISTINCTCOUNT(PEDIDO_VENDA[NS_CODIGO]))&lt;/P&gt;&lt;P&gt;If the above still does not work, please provide more details about your data and the filters applied to the tables.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 12:29:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-division/m-p/3031252#M103587</guid>
      <dc:creator>jaweher899</dc:creator>
      <dc:date>2023-01-19T12:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with division</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-division/m-p/3031857#M103659</link>
      <description>&lt;P&gt;I managed to solve it here. The filters were different. Thank you very much&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 15:56:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Problem-with-division/m-p/3031857#M103659</guid>
      <dc:creator>Thiagops</dc:creator>
      <dc:date>2023-01-19T15:56:36Z</dc:date>
    </item>
  </channel>
</rss>

