<?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: Calculated column that tells me whether someone has engaged with organisation repeatedly in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-that-tells-me-whether-someone-has-engaged-with/m-p/4085973#M162169</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470368" data-lia-user-login="Gabry" class="lia-mention lia-mention-user"&gt;Gabry&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Your thinking is correct.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;And I would like to share some additional solutions below.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="787098" data-lia-user-login="MadalenaBicho" class="lia-mention lia-mention-user"&gt;MadalenaBicho&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;I am glad to help you.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Based on your description, I'm assuming you mean that clients who have worked with you for 3 months or more in the last 12 months are referred to as 'recurrent'?&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;If I understand you correctly, perhaps the test dataset you are giving is not entirely appropriate as your dataset is more than 12 months old for today. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Therefore I have added a few more rows of test data based on your data:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;You can then add a new calculated column in Power BI Desktop by clicking on New Column:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Recurrent = 
VAR CurrentDate =
    MAX ( 'Table'[Month] )
VAR StartDate =
    EDATE ( CurrentDate, -12 )
VAR EngagementCount =
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Month] ),
        FILTER (
            'Table',
            'Table'[Name] = EARLIER ( 'Table'[Name] )
                &amp;amp;&amp;amp; 'Table'[Month] &amp;gt;= StartDate
                &amp;amp;&amp;amp; 'Table'[Month] &amp;lt;= CurrentDate
        )
    )
RETURN
    IF ( EngagementCount &amp;gt;= 3, TRUE, FALSE )
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;In my data, only 'Mike Green' is a match, so only his row returns 'True':&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Hope this helps!&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.&lt;BR /&gt;Best Regards,&lt;BR /&gt;Fen Ling,&lt;BR /&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Aug 2024 06:29:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-08-07T06:29:32Z</dc:date>
    <item>
      <title>Calculated column that tells me whether someone has engaged with organisation repeatedly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-that-tells-me-whether-someone-has-engaged-with/m-p/4084426#M162112</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am very new to Power BI but I am currently working on a Power BI report for my organisation.&amp;nbsp;I have a table that looks like the below:&amp;nbsp;&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;Name&lt;/TD&gt;&lt;TD&gt;Month&lt;/TD&gt;&lt;TD&gt;Number of engagements&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jane Doe&lt;/TD&gt;&lt;TD&gt;July 2020&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jane Doe&lt;/TD&gt;&lt;TD&gt;August 2020&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;John Doe&lt;/TD&gt;&lt;TD&gt;July 2020&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;John Doe&lt;/TD&gt;&lt;TD&gt;August 2020&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;John Doe&lt;/TD&gt;&lt;TD&gt;November 2020&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a category of client called 'recurrent' which we classify as those that have engaged with us 3 or more months out of the past 12 months.&amp;nbsp;I would like my report to be able to automatically identify these clients by using a measure or a calculated column. I was thinking of a calculated column with a DAX formula that returns True or False results based on the criteria I've specified. Therefore, Jane Doe would return False but John Doe would return True.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;However, I'm very new to DAX and Power BI in general and so would appreciate some help on how to achieve this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance!!!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 14:22:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-that-tells-me-whether-someone-has-engaged-with/m-p/4084426#M162112</guid>
      <dc:creator>MadalenaBicho</dc:creator>
      <dc:date>2024-08-06T14:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column that tells me whether someone has engaged with organisation repeatedly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-that-tells-me-whether-someone-has-engaged-with/m-p/4084733#M162125</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="787098" data-lia-user-login="MadalenaBicho" class="lia-mention lia-mention-user"&gt;MadalenaBicho&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;the solution may vary based on your model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a fast solution to your question I can tell:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CalculatedColumn=&amp;nbsp;&lt;BR /&gt;Var _user= [name]&lt;BR /&gt;var _numM=&amp;nbsp;calculate(distinctcount([month]), all(table), 'table'[name]=_user)&lt;BR /&gt;return&lt;/P&gt;
&lt;P&gt;if(_numM&amp;gt;=3, 1,0)&lt;BR /&gt;&lt;BR /&gt;Let me know if it's ok&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 16:29:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-that-tells-me-whether-someone-has-engaged-with/m-p/4084733#M162125</guid>
      <dc:creator>Gabry</dc:creator>
      <dc:date>2024-08-06T16:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column that tells me whether someone has engaged with organisation repeatedly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-that-tells-me-whether-someone-has-engaged-with/m-p/4085973#M162169</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="470368" data-lia-user-login="Gabry" class="lia-mention lia-mention-user"&gt;Gabry&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Your thinking is correct.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;And I would like to share some additional solutions below.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="787098" data-lia-user-login="MadalenaBicho" class="lia-mention lia-mention-user"&gt;MadalenaBicho&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;I am glad to help you.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Based on your description, I'm assuming you mean that clients who have worked with you for 3 months or more in the last 12 months are referred to as 'recurrent'?&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;If I understand you correctly, perhaps the test dataset you are giving is not entirely appropriate as your dataset is more than 12 months old for today. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Therefore I have added a few more rows of test data based on your data:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;You can then add a new calculated column in Power BI Desktop by clicking on New Column:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Recurrent = 
VAR CurrentDate =
    MAX ( 'Table'[Month] )
VAR StartDate =
    EDATE ( CurrentDate, -12 )
VAR EngagementCount =
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[Month] ),
        FILTER (
            'Table',
            'Table'[Name] = EARLIER ( 'Table'[Name] )
                &amp;amp;&amp;amp; 'Table'[Month] &amp;gt;= StartDate
                &amp;amp;&amp;amp; 'Table'[Month] &amp;lt;= CurrentDate
        )
    )
RETURN
    IF ( EngagementCount &amp;gt;= 3, TRUE, FALSE )
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;In my data, only 'Mike Green' is a match, so only his row returns 'True':&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-contrast="auto"&gt;Hope this helps!&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.&lt;BR /&gt;Best Regards,&lt;BR /&gt;Fen Ling,&lt;BR /&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 06:29:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-that-tells-me-whether-someone-has-engaged-with/m-p/4085973#M162169</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-07T06:29:32Z</dc:date>
    </item>
  </channel>
</rss>

