<?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: lookup values from another table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2989370#M100512</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;You should create calculated columns and measures on the &lt;STRONG&gt;fact table&lt;/STRONG&gt;, as shown in my picture.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Neeko Tang&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;  to help the other members find it more quickly.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Dec 2022 02:16:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-12-27T02:16:19Z</dc:date>
    <item>
      <title>lookup values from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2983935#M100081</link>
      <description>&lt;P&gt;Hi, experts, I have two tables, dimension table and fact table, I created a filter use column from dimension table, but fact table may not exist some values in dimension table, and I need to make sure all the values from the fiters selected has relevant data, do you have any ideas?&lt;/P&gt;&lt;P&gt;My idea is that creat a measure in the dimension table, when the value from fact table exist in dimension table, then return 1, else 0, and apply this measure to the filter, but the measure crteated is not work.&lt;/P&gt;&lt;P&gt;here is the sample data and expected result:&lt;/P&gt;&lt;P&gt;dimsention table&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;region&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;fact table&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;region&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;adaf&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;fadfa&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;expected result:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;region&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;measure&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I created mesure like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;measure=&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;VAR&amp;nbsp;_fact=MAX('fact'[region])&lt;/EM&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR&amp;nbsp;_dim=MAX('dim'[region])&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;RETURN IF(_fact=_dim,1,0)&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but the measure did not work&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;do you know how to how to make this measure correct or any other ideas on make the slicer show only relevant data?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Dec 2022 10:27:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2983935#M100081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-22T10:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: lookup values from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2983975#M100082</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Please find the below solution.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Column = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt;&lt;SPAN&gt;[Region]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;RELATED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Fact'&lt;/SPAN&gt;&lt;SPAN&gt;[REgion]&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;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Shreya&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Dec 2022 10:39:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2983975#M100082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-22T10:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: lookup values from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2984337#M100106</link>
      <description>&lt;P&gt;I did not get the result use this column, there is&amp;nbsp; aloway an error with RELATED function,&lt;BR /&gt;maybe because the data is imported?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 13:47:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2984337#M100106</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-22T13:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: lookup values from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2985770#M100195</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;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) My test data is the same as yours.&lt;/P&gt;
&lt;P&gt;(2) We can create a measure.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = IF(LOOKUPVALUE('dimsention table'[region],'fact table'[region],MAX('dimsention table'[region])) ==BLANK(),0,1)&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&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;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 06:09:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2985770#M100195</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-23T06:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: lookup values from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2986088#M100228</link>
      <description>&lt;P&gt;Thanks, the sample data maybe too simple and some problems might hidden.&lt;/P&gt;&lt;P&gt;If I add a row of data in fact table {C, aaa}, and the required relationship is 1-n, there would be an error, and I tried many times with this method&lt;/P&gt;&lt;P&gt;here is the fact table and relationship, and relevant error:&lt;/P&gt;&lt;P&gt;fact table added one record:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;relationship:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;error:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 09:29:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2986088#M100228</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-23T09:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: lookup values from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2988094#M100407</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;(1) We can create a calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = IF('Fact Table'[region]=RELATED('Dimension table'[region]),1,0)&lt;/LI-CODE&gt;
&lt;P&gt;(2)We can create a measure.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = IF(SELECTEDVALUE('Fact Table'[Column])==BLANK(),0,1)&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Dec 2022 01:26:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2988094#M100407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-26T01:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: lookup values from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2989365#M100511</link>
      <description>&lt;P&gt;Thanks for your explanation, did you get an error when creating column? Actually there is always an error when I create a column like that, it says parameter is not the correct type&lt;/P&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;</description>
      <pubDate>Tue, 27 Dec 2022 02:11:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2989365#M100511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-27T02:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: lookup values from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2989370#M100512</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;You should create calculated columns and measures on the &lt;STRONG&gt;fact table&lt;/STRONG&gt;, as shown in my picture.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;Neeko Tang&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="background: white; margin: 7.5pt 0in 0in 0in;"&gt;&lt;SPAN&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;  to help the other members find it more quickly.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 02:16:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/lookup-values-from-another-table/m-p/2989370#M100512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-27T02:16:19Z</dc:date>
    </item>
  </channel>
</rss>

