<?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: Use a IF function on filtered Table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-IF-function-on-filtered-Table/m-p/3002518#M101425</link>
    <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="472458" data-lia-user-login="Imad-R" class="lia-mention lia-mention-user"&gt;Imad-R&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;Table1：&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Table2：&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to make IF judgments by columns of two tables, you can use Selectcolumns().&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/selectcolumns-function-dax" target="_blank"&gt;SELECTCOLUMNS function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Custom rule.&lt;/P&gt;
&lt;P&gt;First filter the data of Table2 with [Index] &amp;lt;=, after judging whether Table1's [Group] exists after filtering Table2's [Group].&lt;/P&gt;
&lt;P&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;LI-CODE lang="markup"&gt;Column =
var _table1=
FILTER(
    'Table2','Table2'[Index]&amp;lt;=3)
var _column=
SELECTCOLUMNS(_table1,"1",[Group])
return
IF(
    'Table1'[Group] in _column ,1,0)&lt;/LI-CODE&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>Thu, 05 Jan 2023 06:25:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-05T06:25:41Z</dc:date>
    <item>
      <title>Use a IF function on filtered Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-IF-function-on-filtered-Table/m-p/3001352#M101345</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to make a conditional calcul between 2 table the second table must be previously filtered with FILTER&amp;nbsp; function.&lt;/P&gt;&lt;P&gt;The table must be filter with a SELECTEDVALUE function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone can help me please.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 15:35:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-IF-function-on-filtered-Table/m-p/3001352#M101345</guid>
      <dc:creator>Imad-R</dc:creator>
      <dc:date>2023-01-04T15:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Use a IF function on filtered Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-IF-function-on-filtered-Table/m-p/3001507#M101357</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="472458" data-lia-user-login="Imad-R" class="lia-mention lia-mention-user"&gt;Imad-R&lt;/a&gt; , You can not use selectedvalue in the calculated table or column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That can only be used in measure or a table in the var of measure&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 16:33:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-IF-function-on-filtered-Table/m-p/3001507#M101357</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-01-04T16:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use a IF function on filtered Table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-IF-function-on-filtered-Table/m-p/3002518#M101425</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="472458" data-lia-user-login="Imad-R" class="lia-mention lia-mention-user"&gt;Imad-R&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;Table1：&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Table2：&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to make IF judgments by columns of two tables, you can use Selectcolumns().&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/selectcolumns-function-dax" target="_blank"&gt;SELECTCOLUMNS function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Custom rule.&lt;/P&gt;
&lt;P&gt;First filter the data of Table2 with [Index] &amp;lt;=, after judging whether Table1's [Group] exists after filtering Table2's [Group].&lt;/P&gt;
&lt;P&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;LI-CODE lang="markup"&gt;Column =
var _table1=
FILTER(
    'Table2','Table2'[Index]&amp;lt;=3)
var _column=
SELECTCOLUMNS(_table1,"1",[Group])
return
IF(
    'Table1'[Group] in _column ,1,0)&lt;/LI-CODE&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>Thu, 05 Jan 2023 06:25:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-a-IF-function-on-filtered-Table/m-p/3002518#M101425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-05T06:25:41Z</dc:date>
    </item>
  </channel>
</rss>

