<?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: Create a New Column in the One Side of a One-Many Relationship in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-New-Column-in-the-One-Side-of-a-One-Many-Relationship/m-p/4273415#M169524</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="654332" data-lia-user-login="kaikai24" class="lia-mention lia-mention-user"&gt;kaikai24&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try using this DAX:-&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LastSixMonthReviewCount = 
VAR SixMonthsAgo = TODAY() - 180
RETURN
    CALCULATE(
        COUNTROWS('Main'),
        'Main'[Classification] = 'LastSixMonthCount'[Classification],
        'Main'[ReviewDate] &amp;gt;= SixMonthsAgo
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if it works for you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Poojara.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2024 05:10:21 GMT</pubDate>
    <dc:creator>Poojara_D12</dc:creator>
    <dc:date>2024-11-07T05:10:21Z</dc:date>
    <item>
      <title>Create a New Column in the One Side of a One-Many Relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-New-Column-in-the-One-Side-of-a-One-Many-Relationship/m-p/4272885#M169496</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a one-to-many relationship between the 'Main' table and the 'LastSixMonthCount' table on the column 'Classification'. The 'Main' table has all the customer reviews. Now I am trying to create a new column in the 'LastSixMonthCount' table, which calculates the counts of customer reviews for each classification in the last six months. My DAX is below, but it does not work. Does anyone have any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 18:18:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-New-Column-in-the-One-Side-of-a-One-Many-Relationship/m-p/4272885#M169496</guid>
      <dc:creator>kaikai24</dc:creator>
      <dc:date>2024-11-06T18:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create a New Column in the One Side of a One-Many Relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-New-Column-in-the-One-Side-of-a-One-Many-Relationship/m-p/4272895#M169499</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="654332" data-lia-user-login="kaikai24" class="lia-mention lia-mention-user"&gt;kaikai24&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try like:&lt;/P&gt;
&lt;P&gt;CountReview =&lt;/P&gt;
&lt;P&gt;COUNTROWS(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; FILTER(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RELATEDTABLE(main),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; main[datelast] &amp;gt;= EDATE(TODAY(), -6)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 18:37:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-New-Column-in-the-One-Side-of-a-One-Many-Relationship/m-p/4272895#M169499</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2024-11-06T18:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create a New Column in the One Side of a One-Many Relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-New-Column-in-the-One-Side-of-a-One-Many-Relationship/m-p/4273238#M169518</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="654332" data-lia-user-login="kaikai24" class="lia-mention lia-mention-user"&gt;kaikai24&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I create two tables as you mentioned and I also create a relationship between them.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then I create a new calculated column and here is the DAX code.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CountReview = 
CALCULATE (
    COUNT ( 'Main'[DA ReviewId] ),
    FILTER (
        'Main',
        AND (
            'Main'[Classification] = EARLIER ( 'LastSixMonthCount'[Classification] ),
            DATEDIFF ( 'Main'[Date of latest rating], TODAY (), MONTH ) &amp;lt;= 6
        )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 02:06:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-New-Column-in-the-One-Side-of-a-One-Many-Relationship/m-p/4273238#M169518</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-07T02:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create a New Column in the One Side of a One-Many Relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-New-Column-in-the-One-Side-of-a-One-Many-Relationship/m-p/4273415#M169524</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="654332" data-lia-user-login="kaikai24" class="lia-mention lia-mention-user"&gt;kaikai24&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try using this DAX:-&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LastSixMonthReviewCount = 
VAR SixMonthsAgo = TODAY() - 180
RETURN
    CALCULATE(
        COUNTROWS('Main'),
        'Main'[Classification] = 'LastSixMonthCount'[Classification],
        'Main'[ReviewDate] &amp;gt;= SixMonthsAgo
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if it works for you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Poojara.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 05:10:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-a-New-Column-in-the-One-Side-of-a-One-Many-Relationship/m-p/4273415#M169524</guid>
      <dc:creator>Poojara_D12</dc:creator>
      <dc:date>2024-11-07T05:10:21Z</dc:date>
    </item>
  </channel>
</rss>

