<?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: Count if values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-if-values/m-p/2256108#M54457</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;The problem is clear, and it is a nice one.&amp;nbsp; Powert BI is really bad at hysteresis&amp;nbsp; (it has no memory) but I think with a bit of DAX trickery this can be achieved, with LASTNONBLANKVALUE or similar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 26 Dec 2021 21:27:31 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2021-12-26T21:27:31Z</dc:date>
    <item>
      <title>Count if values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-if-values/m-p/2095025#M47745</link>
      <description>&lt;P&gt;Hello to all,&lt;/P&gt;&lt;P&gt;I ask for your help concerning a measurement of type "IF".&lt;/P&gt;&lt;P&gt;I would like to display "1000" when the value of the measurement "Digester level (m)" reaches the value of 6 then continue to display "1000" as long as the value of the measurement has not reached a value lower than 4. When the value is below 4, stop counting until the cycle repeats itself. Today here is my measurement:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Période torchée = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR _selDate = SELECTEDVALUE(dim_date[DT (1min)])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR _maxDate = CALCULATE(LASTNONBLANK(dim_date[DT (1min)], [booléen niveau digesteur]), FILTER(ALLSELECTED(dim_date[DT (1min)]), dim_date[DT (1min)] &amp;lt; _selDate))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR _maxDate_dig = CALCULATE(LASTNONBLANK(dim_date[DT (1min)], [Niveau Digesteur(m)]), FILTER(ALLSELECTED(fact_point_torch_juin), [Niveau Digesteur(m)] &amp;gt;= 4))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF(AND(CALCULATE([booléen niveau digesteur]=1000,FILTER(ALLSELECTED(dim_date),dim_date[DT (1min)] = _maxDate)),[Niveau Digesteur(m)]&amp;gt;=4),1000,0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I obtain this result, the problem is that the "IF" does not wait that the measurement reaches again the value 6 to post 1000.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The cycle does not work, it would be necessary that the zone framed in red is equal to zero here.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;Is my problem clear ?&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;&lt;P&gt;Joël&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 Sep 2021 16:17:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-if-values/m-p/2095025#M47745</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-23T16:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count if values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-if-values/m-p/2256108#M54457</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;The problem is clear, and it is a nice one.&amp;nbsp; Powert BI is really bad at hysteresis&amp;nbsp; (it has no memory) but I think with a bit of DAX trickery this can be achieved, with LASTNONBLANKVALUE or similar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Dec 2021 21:27:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-if-values/m-p/2256108#M54457</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-12-26T21:27:31Z</dc:date>
    </item>
  </channel>
</rss>

