<?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 Looking up values across different tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602040#M75232</link>
    <description>&lt;P&gt;Hi, I have two tables. One is a list of students the other a list of activities. I wish to count (in DAX)&amp;nbsp;the number of distinct activities they have choosen if they are "Co-curirrcular" (Green). I have the output column in yellow and red values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Q&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 26 Jun 2022 09:14:38 GMT</pubDate>
    <dc:creator>pickslides</dc:creator>
    <dc:date>2022-06-26T09:14:38Z</dc:date>
    <item>
      <title>Looking up values across different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602040#M75232</link>
      <description>&lt;P&gt;Hi, I have two tables. One is a list of students the other a list of activities. I wish to count (in DAX)&amp;nbsp;the number of distinct activities they have choosen if they are "Co-curirrcular" (Green). I have the output column in yellow and red values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Q&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2022 09:14:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602040#M75232</guid>
      <dc:creator>pickslides</dc:creator>
      <dc:date>2022-06-26T09:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Looking up values across different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602054#M75237</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="394836" data-lia-user-login="pickslides" class="lia-mention lia-mention-user"&gt;pickslides&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Count =
COUNTROWS (
    FILTER (
        Participation,
        Participation[Category] = "Co-curirrcular"
            &amp;amp;&amp;amp; Participation[Preferred] = Sudent[Preferred]
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2022 09:24:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602054#M75237</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-26T09:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Looking up values across different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602061#M75241</link>
      <description>&lt;P&gt;This didnt work but it didnt give me an error. Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2022 09:53:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602061#M75241</guid>
      <dc:creator>pickslides</dc:creator>
      <dc:date>2022-06-26T09:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Looking up values across different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602062#M75242</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="394836" data-lia-user-login="pickslides" class="lia-mention lia-mention-user"&gt;pickslides&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any relationship between the two tables?&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2022 10:00:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602062#M75242</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-26T10:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Looking up values across different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602063#M75243</link>
      <description>&lt;P&gt;Yes, I have a one to many relationship on the UID field&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2022 10:02:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602063#M75243</guid>
      <dc:creator>pickslides</dc:creator>
      <dc:date>2022-06-26T10:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Looking up values across different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602065#M75245</link>
      <description>&lt;P&gt;A-ha.. I found a typo in the formula. Seems to work now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the result is zero, cells are blank, can I populate with 0 somehow?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2022 10:06:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602065#M75245</guid>
      <dc:creator>pickslides</dc:creator>
      <dc:date>2022-06-26T10:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Looking up values across different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602068#M75247</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="394836" data-lia-user-login="pickslides" class="lia-mention lia-mention-user"&gt;pickslides&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Two questions: do you have relationship between the two tables? Are you creating a calculated coumn in the student table?&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jun 2022 10:12:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602068#M75247</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-26T10:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Looking up values across different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602070#M75249</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="394836" data-lia-user-login="pickslides" class="lia-mention lia-mention-user"&gt;pickslides&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes you can&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Count =
COUNTROWS (
    FILTER (
        Participation,
        Participation[Category] = "Co-curirrcular"
            &amp;amp;&amp;amp; Participation[Preferred] = Sudent[Preferred]
    )
) + 0&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 26 Jun 2022 10:14:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2602070#M75249</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-26T10:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Looking up values across different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2608612#M75584</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="394836" data-lia-user-login="pickslides" class="lia-mention lia-mention-user"&gt;pickslides&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TABLE Participation:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag1 =
var _flag1=IF(
    'TABLE Participation'[Category]="Co-Curricular Activities",1,0)
return
SUMX(
    FILTER(ALL('TABLE Participation'),
    'TABLE Participation'[Perferred]=EARLIER('TABLE Participation'[Perferred]) &amp;amp;&amp;amp;'TABLE Participation'[Category]=EARLIER('TABLE Participation'[Category]) ),_flag1)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Table Student:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count =
var _if1=
IF(
   NOT( ISBLANK(
CALCULATE(
    MAX('TABLE Participation'[Perferred]),FILTER(ALL('TABLE Participation'),
    'TABLE Participation'[UID]='Table Student'[UID])))),
    CALCULATE(MAX('TABLE Participation'[Flag1]),FILTER(all('TABLE Participation'),'TABLE Participation'[UID]=EARLIER('Table Student'[UID]))))
    return
IF(
    _if1 =0,BLANK(),_if1)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 07:50:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Looking-up-values-across-different-tables/m-p/2608612#M75584</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-29T07:50:26Z</dc:date>
    </item>
  </channel>
</rss>

