<?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: Measure not affected by table rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-affected-by-table-rows/m-p/3863688#M150938</link>
    <description>&lt;P&gt;Read about HASONEVALUE and use that in your measure.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2024 00:12:39 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-04-24T00:12:39Z</dc:date>
    <item>
      <title>Measure not affected by table rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-affected-by-table-rows/m-p/3862423#M150889</link>
      <description>&lt;P&gt;Hello, everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm doing a measure that need to show me a value based on the total of a count. Depending on the total, it's going to show me diferent values, like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 to 24 = 47,00&lt;BR /&gt;25 to 30 = 55,00&lt;BR /&gt;31 to 40 = 60,00&lt;BR /&gt;More than 41 = 65,00&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;When I use this measure on a card it works perfectly, it shows me the exactly value I need, like the image below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, when I try to use this on a TABLE it breaks the value per row. On the&amp;nbsp;&lt;STRONG&gt;total&lt;/STRONG&gt; it show correctly how the value is supposed to be, but on the rows it shows the minimum value. There's a way to make the measure show me the value in the &lt;STRONG&gt;total&lt;/STRONG&gt; cell on the rows?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The measure I using is this one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;VALOR_COMISSAO = 
    VAR qtd_benef = 
        CALCULATE(
            DISTINCTCOUNT('power_bi gestao_contratos'[codigo_pessoa]),
            FILTER('power_bi gestao_contratos','power_bi gestao_contratos'[indica_plano_ant] = "N"),
                    'power_bi gestao_contratos','power_bi gestao_contratos'[SITUAÇÃO FATURA] = "PAGO",
            KEEPFILTERS('Tb_Calendário'[Competencia]),
            REMOVEFILTERS('Tb_Calendário'[Ano]))
    VAR valor_comissao = 
        CALCULATE(   
            MAXA('power_bi comercial_val_comiss_consult'[valor]),
            FILTER('power_bi comercial_val_comiss_consult',
                    'power_bi comercial_val_comiss_consult'[vidas_inicial] &amp;lt;= qtd_benef),
            GROUPBY('power_bi gestao_contratos','power_bi gestao_contratos'[nome_vendedor]),
            KEEPFILTERS('Tb_Calendário'[Competencia]),
            REMOVEFILTERS('Tb_Calendário'[Ano]))
    RETURN valor_comissao&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Basically this measure has two steps separated in two variables:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;qtd_benef: this measure count the values that will be used in the next step.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;valor_comissao: the result of "qtd_benef" is the value used on the FILTER command to get the value of MAXA.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;the QTD_BENEF it the (34) and VALOR_COMISSAO is (60) that appears on the first image.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Daniel.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 13:06:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-affected-by-table-rows/m-p/3862423#M150889</guid>
      <dc:creator>Aurore</dc:creator>
      <dc:date>2024-04-23T13:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Measure not affected by table rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-affected-by-table-rows/m-p/3863688#M150938</link>
      <description>&lt;P&gt;Read about HASONEVALUE and use that in your measure.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 00:12:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-not-affected-by-table-rows/m-p/3863688#M150938</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-04-24T00:12:39Z</dc:date>
    </item>
  </channel>
</rss>

