<?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 Percentil with filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentil-with-filter/m-p/2572750#M73554</link>
    <description>&lt;P&gt;Hello world!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yesterday, with the help of &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt; I was able to solve a problem with the task&amp;nbsp;&lt;LI-MESSAGE title="Percentile." uid="2570585" url="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Percentile/m-p/2570585#U2570585" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&lt;/P&gt;&lt;P&gt;Today I have a new challenge with the same topic. I have to calculte the same measure with the differents filters of the table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I have that table with diferents columns, Fábrica, Campa, Semana, Mes, Año, Marca, with differents valuers. When I filter some valuer from the columns, the NewMesure_1 dosen't work, it appers the same valures that in general without filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without filter the&amp;nbsp; NewMesure_1 works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But, if I do a filter, it does not work because appears the same values.&lt;/P&gt;&lt;P&gt;&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;The&amp;nbsp;NewMesure_1 is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NewMeasure_1 = 
VAR total_ = CALCULATE ( COUNT ( Tabla[Estancia Fábrica] ), ALL ( Tabla ) )
VAR currentEst_ = SELECTEDVALUE ( Tabla[Estancia Fábrica], total_ )
VAR cumul_ =
    CALCULATE (
        COUNT ( Tabla[Estancia Fábrica] ),
        Tabla[Estancia Fábrica] &amp;lt;= currentEst_,
        ALL ( Tabla )
    )
RETURN
DIVIDE ( cumul_, total_ )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the example of the table is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fgstnr Fábrica Campa Semana Mes Año Marca Estancia Fábrica 1 Mar Sch 13 Abril 2022 Sea 1 2 Bar Sch 14 Abril 2022 Sea 2 3 Mar Sch 14 Abril 2022 Cup 3 4 Mar Sch 12 Abril 2022 Cup 4 5 Mar Sch 14 Abril 2022 Sea 1 6 Mar Sch 14 Abril 2022 Sea 2 7 Bar Sch 12 Abril 2022 Sea 3 8 Mar Sch 11 Abril 2022 Cup 4 9 Bar Sch 14 Abril 2022 Sea 1 10 Bar Sch 14 Abril 2022 Cup 2 11 Bar Sch 12 Abril 2022 Sea 1 12 Mar Sch 14 Abril 2022 Sea 1 13 Mar Sch 14 Abril 2022 Cup 2 14 Bar Sch 12 Abril 2022 Sea 1 15 Mar Sch 14 Abril 2022 Sea 0 16 Bar Sch 11 Abril 2022 Cup 1 17 Mar Sch 11 Abril 2022 Sea 1 18 Bar Sch 14 Abril 2022 Sea 0 19 Mar Sch 12 Abril 2022 Cup 1 20 Bar Sch 14 Abril 2022 Sea 2 21 Mar Sch 14 Abril 2022 Sea 0 22 Bar Sch 14 Abril 2022 Sea 0 23 Bar Sch 12 Abril 2022 Cup 0 24 Mar Sch 14 Abril 2022 Sea 1 25 Mar Sch 14 Abril 2022 Sea 1 26 Mar Sch 14 Abril 2022 Cup 1 27 Mar Sch 14 Abril 2022 Sea 2 28 Mar Sch 14 Abril 2022 Sea 2 29 Mar Sch 14 Abril 2022 Sea 2 30 Mar Sch 14 Abril 2022 Cup 2 31 Mar Sch 14 Abril 2022 Sea 2 32 Mar Sch 14 Abril 2022 Cup 1 33 Bar Sch 14 Abril 2022 Sea 1 34 Mar Sch 14 Abril 2022 Cup 1 35 Mar Sch 12 Abril 2022 Cup 1 36 Mar Sch 14 Abril 2022 Sea 1 37 Mar Sch 14 Abril 2022 Sea 1 38 Bar Sch 12 Abril 2022 Sea 1 39 Mar Sch 11 Abril 2022 Cup 1 40 Bar Sch 14 Abril 2022 Sea 2 41 Bar Sch 14 Abril 2022 Cup 1 42 Bar Sch 12 Abril 2022 Sea 1 43 Mar Sch 14 Abril 2022 Sea 1 44 Mar Sch 14 Abril 2022 Cup 1 45 Bar Sch 12 Abril 2022 Sea 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thhank you ver much!&lt;/P&gt;</description>
    <pubDate>Sat, 11 Jun 2022 06:20:27 GMT</pubDate>
    <dc:creator>MTrullàs</dc:creator>
    <dc:date>2022-06-11T06:20:27Z</dc:date>
    <item>
      <title>Percentil with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentil-with-filter/m-p/2572750#M73554</link>
      <description>&lt;P&gt;Hello world!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yesterday, with the help of &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt; I was able to solve a problem with the task&amp;nbsp;&lt;LI-MESSAGE title="Percentile." uid="2570585" url="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Percentile/m-p/2570585#U2570585" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&lt;/P&gt;&lt;P&gt;Today I have a new challenge with the same topic. I have to calculte the same measure with the differents filters of the table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I have that table with diferents columns, Fábrica, Campa, Semana, Mes, Año, Marca, with differents valuers. When I filter some valuer from the columns, the NewMesure_1 dosen't work, it appers the same valures that in general without filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without filter the&amp;nbsp; NewMesure_1 works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;But, if I do a filter, it does not work because appears the same values.&lt;/P&gt;&lt;P&gt;&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;The&amp;nbsp;NewMesure_1 is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NewMeasure_1 = 
VAR total_ = CALCULATE ( COUNT ( Tabla[Estancia Fábrica] ), ALL ( Tabla ) )
VAR currentEst_ = SELECTEDVALUE ( Tabla[Estancia Fábrica], total_ )
VAR cumul_ =
    CALCULATE (
        COUNT ( Tabla[Estancia Fábrica] ),
        Tabla[Estancia Fábrica] &amp;lt;= currentEst_,
        ALL ( Tabla )
    )
RETURN
DIVIDE ( cumul_, total_ )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the example of the table is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fgstnr Fábrica Campa Semana Mes Año Marca Estancia Fábrica 1 Mar Sch 13 Abril 2022 Sea 1 2 Bar Sch 14 Abril 2022 Sea 2 3 Mar Sch 14 Abril 2022 Cup 3 4 Mar Sch 12 Abril 2022 Cup 4 5 Mar Sch 14 Abril 2022 Sea 1 6 Mar Sch 14 Abril 2022 Sea 2 7 Bar Sch 12 Abril 2022 Sea 3 8 Mar Sch 11 Abril 2022 Cup 4 9 Bar Sch 14 Abril 2022 Sea 1 10 Bar Sch 14 Abril 2022 Cup 2 11 Bar Sch 12 Abril 2022 Sea 1 12 Mar Sch 14 Abril 2022 Sea 1 13 Mar Sch 14 Abril 2022 Cup 2 14 Bar Sch 12 Abril 2022 Sea 1 15 Mar Sch 14 Abril 2022 Sea 0 16 Bar Sch 11 Abril 2022 Cup 1 17 Mar Sch 11 Abril 2022 Sea 1 18 Bar Sch 14 Abril 2022 Sea 0 19 Mar Sch 12 Abril 2022 Cup 1 20 Bar Sch 14 Abril 2022 Sea 2 21 Mar Sch 14 Abril 2022 Sea 0 22 Bar Sch 14 Abril 2022 Sea 0 23 Bar Sch 12 Abril 2022 Cup 0 24 Mar Sch 14 Abril 2022 Sea 1 25 Mar Sch 14 Abril 2022 Sea 1 26 Mar Sch 14 Abril 2022 Cup 1 27 Mar Sch 14 Abril 2022 Sea 2 28 Mar Sch 14 Abril 2022 Sea 2 29 Mar Sch 14 Abril 2022 Sea 2 30 Mar Sch 14 Abril 2022 Cup 2 31 Mar Sch 14 Abril 2022 Sea 2 32 Mar Sch 14 Abril 2022 Cup 1 33 Bar Sch 14 Abril 2022 Sea 1 34 Mar Sch 14 Abril 2022 Cup 1 35 Mar Sch 12 Abril 2022 Cup 1 36 Mar Sch 14 Abril 2022 Sea 1 37 Mar Sch 14 Abril 2022 Sea 1 38 Bar Sch 12 Abril 2022 Sea 1 39 Mar Sch 11 Abril 2022 Cup 1 40 Bar Sch 14 Abril 2022 Sea 2 41 Bar Sch 14 Abril 2022 Cup 1 42 Bar Sch 12 Abril 2022 Sea 1 43 Mar Sch 14 Abril 2022 Sea 1 44 Mar Sch 14 Abril 2022 Cup 1 45 Bar Sch 12 Abril 2022 Sea 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thhank you ver much!&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 06:20:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentil-with-filter/m-p/2572750#M73554</guid>
      <dc:creator>MTrullàs</dc:creator>
      <dc:date>2022-06-11T06:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Percentil with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentil-with-filter/m-p/2572753#M73555</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399197" data-lia-user-login="MTrullàs" class="lia-mention lia-mention-user"&gt;MTrullàs&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's the ALL(Tabla) that is overriding all the filters. Try this. If it doesn´t work, share the data in the same format as you did yesterday. Today's format is not good to copy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NewMeasure_2 = 
VAR total_ = CALCULATE ( COUNT ( Tabla[Estancia Fábrica] ), ALL ( Tabla[Estancia Fábrica]) )
VAR currentEst_ = SELECTEDVALUE ( Tabla[Estancia Fábrica], total_ )
VAR cumul_ =
    CALCULATE (
        COUNT ( Tabla[Estancia Fábrica] ),
        Tabla[Estancia Fábrica] &amp;lt;= currentEst_,
        ALL ( Tabla[Estancia Fábrica] )
    )
RETURN
DIVIDE ( cumul_, total_ )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 06:45:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentil-with-filter/m-p/2572753#M73555</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2022-06-11T06:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Percentil with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentil-with-filter/m-p/2572816#M73562</link>
      <description>&lt;P&gt;Thanks &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;, this works just fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the future, I wish I could help others like you.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 10:50:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentil-with-filter/m-p/2572816#M73562</guid>
      <dc:creator>MTrullàs</dc:creator>
      <dc:date>2022-06-11T10:50:42Z</dc:date>
    </item>
  </channel>
</rss>

