<?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 Measure that displays month when value for column X changed in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2580746#M74038</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a seemingly easy measure in Power Bi.&amp;nbsp; I have a year, month and a binary variable called Threshold_Passed. I&amp;nbsp; want to create a measure that contains the month in which the Threshold_Passed measure changed from False to True, because only in that month I need to check it.&amp;nbsp;If it is True again in April, I can assume it has already been checked last month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can also happen that in the first month of the year the Threshold_Passed measure is already True. In that case the Month_Threshold_Passed should be January. Once the Threshold_Passed variable has a True, it can never go back to false within the same year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Year&lt;/TD&gt;&lt;TD&gt;Month&lt;/TD&gt;&lt;TD&gt;Threshold_Passed&lt;/TD&gt;&lt;TD&gt;Month_Threshold_Passed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;January&lt;/TD&gt;&lt;TD&gt;False&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;February&lt;/TD&gt;&lt;TD&gt;False&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;March&lt;/TD&gt;&lt;TD&gt;True&lt;/TD&gt;&lt;TD&gt;March&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;April&lt;/TD&gt;&lt;TD&gt;True&lt;/TD&gt;&lt;TD&gt;March&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated. Let me know if you need any more information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards, Jorrit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jun 2022 15:33:43 GMT</pubDate>
    <dc:creator>Jorritster</dc:creator>
    <dc:date>2022-06-15T15:33:43Z</dc:date>
    <item>
      <title>Measure that displays month when value for column X changed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2580746#M74038</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a seemingly easy measure in Power Bi.&amp;nbsp; I have a year, month and a binary variable called Threshold_Passed. I&amp;nbsp; want to create a measure that contains the month in which the Threshold_Passed measure changed from False to True, because only in that month I need to check it.&amp;nbsp;If it is True again in April, I can assume it has already been checked last month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can also happen that in the first month of the year the Threshold_Passed measure is already True. In that case the Month_Threshold_Passed should be January. Once the Threshold_Passed variable has a True, it can never go back to false within the same year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Year&lt;/TD&gt;&lt;TD&gt;Month&lt;/TD&gt;&lt;TD&gt;Threshold_Passed&lt;/TD&gt;&lt;TD&gt;Month_Threshold_Passed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;January&lt;/TD&gt;&lt;TD&gt;False&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;February&lt;/TD&gt;&lt;TD&gt;False&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;March&lt;/TD&gt;&lt;TD&gt;True&lt;/TD&gt;&lt;TD&gt;March&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;April&lt;/TD&gt;&lt;TD&gt;True&lt;/TD&gt;&lt;TD&gt;March&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated. Let me know if you need any more information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards, Jorrit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 15:33:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2580746#M74038</guid>
      <dc:creator>Jorritster</dc:creator>
      <dc:date>2022-06-15T15:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Measure that displays month when value for column X changed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2586484#M74405</link>
      <description>&lt;P&gt;You can use MIN() or FIRSTNONBLANK() or many other approaches for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.&lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jun 2022 00:19:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2586484#M74405</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-06-18T00:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Measure that displays month when value for column X changed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2588611#M74515</link>
      <description>&lt;P&gt;Hi Ibendlin,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As the data is confidential I did not add it initially. However, I have created some dummy data based on manual entry that covers an example. I have not included the model as I am using a lot of different sources:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/s/sxt9vju0xkhbn5t/Dummy_Threshold_Management.pbix?dl=0" target="_blank"&gt;https://www.dropbox.com/s/sxt9vju0xkhbn5t/Dummy_Threshold_Management.pbix?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To give you some more perspective (in the actual model):&amp;nbsp;&lt;/P&gt;&lt;P&gt;- YTD_TaxableBasis is a YTD calculation of Monthly TaxableBasis.&lt;/P&gt;&lt;P&gt;- Threshold is coming from a different table (each country has a different threshold).&lt;/P&gt;&lt;P&gt;- Threshold_Passed equals True if YTD_TaxableBasis &amp;gt; Threshold.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Goal: create an indicator (Month_Threshold_Passed) to know when the threshold was passed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps, Jorrit&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 08:00:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2588611#M74515</guid>
      <dc:creator>Jorritster</dc:creator>
      <dc:date>2022-06-20T08:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Measure that displays month when value for column X changed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2593562#M74778</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="401625" data-lia-user-login="Jorritster" class="lia-mention lia-mention-user"&gt;Jorritster&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, I download your sample, here's my solution.&lt;/P&gt;
&lt;P&gt;Create a measure,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Month_Threshold_Passed =
VAR _MIN =
    MINX (
        FILTER (
            ALL ( 'Table' ),
            YEAR ( 'Table'[Date] ) = YEAR ( MAX ( 'Table'[Date] ) )
                &amp;amp;&amp;amp; 'Table'[Threshold_Passed] = "True"
        ),
        'Table'[Date]
    )
RETURN
    IF (
        MONTH ( MAX ( 'Table'[Date] ) ) &amp;lt; MONTH ( _MIN )
            || NOT ( ISINSCOPE ( 'Table'[Customer] ) ),
        BLANK (),
        FORMAT ( _MIN, "MMMM" )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;Get the result.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I attach my sample for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps,&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 02:23:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2593562#M74778</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2022-06-22T02:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Measure that displays month when value for column X changed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2594259#M74828</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334520" data-lia-user-login="v-yanjiang-msft" class="lia-mention lia-mention-user"&gt;v-yanjiang-msft&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your a hero. Thanks for your help. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have accepted your post as a solution. Cheers!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 08:29:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2594259#M74828</guid>
      <dc:creator>Jorritster</dc:creator>
      <dc:date>2022-06-22T08:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Measure that displays month when value for column X changed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2603283#M75315</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334520" data-lia-user-login="v-yanjiang-msft" class="lia-mention lia-mention-user"&gt;v-yanjiang-msft&lt;/a&gt;,&amp;nbsp;one additional question. Ideally, for my dashboard I want the user to be able to filter with a slicer on the Month_Threshold_Passed. After Googling I found out that I need to create a column for this. However, if I use the same code it does not understand the relationships. This is my model:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;How can I include related(table) in the code to make it work for a column? I have a bridge direction table because otherwise I have a many-to-many relationship.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you can help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 07:55:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-that-displays-month-when-value-for-column-X-changed/m-p/2603283#M75315</guid>
      <dc:creator>Jorritster</dc:creator>
      <dc:date>2022-06-27T07:55:48Z</dc:date>
    </item>
  </channel>
</rss>

