<?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: DAX Calculated Column in the Table View in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-in-the-Table-View/m-p/4122871#M163696</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="614480" data-lia-user-login="TJK" class="lia-mention lia-mention-user"&gt;TJK&lt;/a&gt;&amp;nbsp;Try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column =
  VAR __Company = [Company]
  VAR __Table = DISTINCT( SELECTCOLUMNS( FILTER( 'Table', [Company] = __Company ), "Lender", [Lender] ) )
  VAR __Result = COUNTROWS( __Table )
RETURN
  __Result&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 28 Aug 2024 13:32:57 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2024-08-28T13:32:57Z</dc:date>
    <item>
      <title>DAX Calculated Column in the Table View</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-in-the-Table-View/m-p/4122840#M163695</link>
      <description>&lt;P&gt;I want to create a calculated column in the Table View in Power BI. I want the calculated column to group the "Company" column based on how many unique values occur in the "Lender" column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, the below table has 3 companies, and each company has two records of their lenders. Company1 has two different lenders, so I want the calculated column to list "2" for both of its records. Company2 and Company3 have the same lender listed twice, so I want the calculated column to list "1" for both of its records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Company,&lt;/TD&gt;&lt;TD&gt;Lender,&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Count of Lenders&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Company1,&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Private,&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Company1,&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Public,&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Company2,&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Private,&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Company2,&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Private,&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Company3,&lt;/TD&gt;&lt;TD&gt;Public,&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Company3,&lt;/TD&gt;&lt;TD&gt;Public,&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know this is possible to achieve with Power Query, but can I achieve it in the Table View once the data is loaded out?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 13:21:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-in-the-Table-View/m-p/4122840#M163695</guid>
      <dc:creator>TJK</dc:creator>
      <dc:date>2024-08-28T13:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Calculated Column in the Table View</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-in-the-Table-View/m-p/4122871#M163696</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="614480" data-lia-user-login="TJK" class="lia-mention lia-mention-user"&gt;TJK&lt;/a&gt;&amp;nbsp;Try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column =
  VAR __Company = [Company]
  VAR __Table = DISTINCT( SELECTCOLUMNS( FILTER( 'Table', [Company] = __Company ), "Lender", [Lender] ) )
  VAR __Result = COUNTROWS( __Table )
RETURN
  __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Aug 2024 13:32:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-in-the-Table-View/m-p/4122871#M163696</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-08-28T13:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Calculated Column in the Table View</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-in-the-Table-View/m-p/4123024#M163708</link>
      <description>&lt;P&gt;Thanks Greg! I was able to solve it with the following too:&lt;BR /&gt;&lt;BR /&gt;Column =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Lender]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Company]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 28 Aug 2024 14:24:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculated-Column-in-the-Table-View/m-p/4123024#M163708</guid>
      <dc:creator>TJK</dc:creator>
      <dc:date>2024-08-28T14:24:48Z</dc:date>
    </item>
  </channel>
</rss>

