<?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 or measure that returns values from Table A corresponding to certain values Tab B in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4405378#M174883</link>
    <description>&lt;P&gt;i can't find the column in RELATED()&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2025 15:02:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-02-11T15:02:12Z</dc:date>
    <item>
      <title>Calculated column or measure that returns values from Table A corresponding to certain values Tab B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4405066#M174869</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;i'd want a Calculated measure or column that returns values of column x of table A corresponding to certain values of another 'table B (for example). What dax should i write?&lt;BR /&gt;&lt;BR /&gt;This is because I tried to write this function:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CampagnaZefir=&lt;/SPAN&gt; &lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TableB&lt;/SPAN&gt;&lt;SPAN&gt;[CodZef]&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;IN&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;"2025"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"C25"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"F25"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"W25"&lt;/SPAN&gt;&lt;SPAN&gt;},&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;and i put it as a filter&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&lt;BR /&gt;but the table shows filtered results only if I add the TableB[CodZef] column, otherwise the values of Table A do not appear.&amp;nbsp;But I want the filtered values to tick without me putting the CodZef column.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How can i do that? Thank you!!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 12:02:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4405066#M174869</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-11T12:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column or measure that returns values from Table A corresponding to certain values Tab B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4405137#M174871</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;, You can try using a calculated column&lt;/P&gt;
&lt;P&gt;CampagnaZefir = &lt;BR /&gt;IF (&lt;BR /&gt;RELATED(TableB[CodZef]) IN {"2025", "C25", "F25", "W25"},&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 12:43:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4405137#M174871</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-02-11T12:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column or measure that returns values from Table A corresponding to certain values Tab B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4405378#M174883</link>
      <description>&lt;P&gt;i can't find the column in RELATED()&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 15:02:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4405378#M174883</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-11T15:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column or measure that returns values from Table A corresponding to certain values Tab B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4406525#M174941</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much&amp;nbsp;bhanu_gautam&amp;nbsp;for your prompt reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Allow me to add something:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Use the RELATED function to ensure there is a relationship between Table A and Table B. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"TableA"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"TableB"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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 don't have a column in your data that would allow you to establish a relationship, you might consider creating a calculated column and using the LOOKUPVALUE function:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FilteredColumn = 
IF (
    LOOKUPVALUE(TableB[CodZef], TableB[ID], TableA[ID]) IN {"2025", "C25", "F25", "W25"},
    1,
    0
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 08:02:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4406525#M174941</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-12T08:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column or measure that returns values from Table A corresponding to certain values Tab B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4406548#M174943</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some liitle things to check :&lt;/P&gt;&lt;P&gt;1/ Do you have a relationship between the 2 tables in your model ?&lt;/P&gt;&lt;P&gt;2/ If no, you need to build the relationship in the model view before using related.&lt;BR /&gt;If yes, are you using the relationship from the table on the side 1 to the table on the side many, or from the table many to the table on the one side of relationship ?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RELATED can be used from the many (*) to one (1)&lt;/STRONG&gt;, and if you are on the table being on the 1 side and want to get info from the table on the many side, then you'll need &lt;STRONG&gt;RELATEDTABLE&lt;/STRONG&gt; as your results will/might not be unique.&lt;/P&gt;&lt;P&gt;In case it might not be clear, herre is an image &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Hope it help&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 08:25:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4406548#M174943</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2025-02-12T08:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated column or measure that returns values from Table A corresponding to certain values Tab B</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4406676#M174952</link>
      <description>&lt;P&gt;i tried related, relatedtable and lookup but if i put&amp;nbsp;&lt;SPAN&gt;IN {"2025", "C25", "F25", "W25"}, there is an alert that says me that "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 09:31:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-column-or-measure-that-returns-values-from-Table-A/m-p/4406676#M174952</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-12T09:31:58Z</dc:date>
    </item>
  </channel>
</rss>

