<?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: filter from many to one relation between two tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/filter-from-many-to-one-relation-between-two-tables/m-p/2845974#M91072</link>
    <description>&lt;P&gt;Thanks Shauya, this works perfectly. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Jayjay0306&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 08:54:01 GMT</pubDate>
    <dc:creator>jayjay0306</dc:creator>
    <dc:date>2022-10-17T08:54:01Z</dc:date>
    <item>
      <title>filter from many to one relation between two tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/filter-from-many-to-one-relation-between-two-tables/m-p/2842497#M90841</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I hope you can help me with a problem:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a DIM_Product table and a FACT_Volume table.&lt;/P&gt;&lt;P&gt;The relation between the "product"-table and "Volume"-table is '1-to-many'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;In my Product table I have a lot of redundant products, which have no volume (in the example above there is one ("3")).&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is that I can't make the cross-filter direction="both", which would solve the problem.&lt;/P&gt;&lt;P&gt;Now, my question is:&lt;/P&gt;&lt;P&gt;Is there a way to set up a calculated column (fx. "flag") on the product table, which can be used as filter, based on the volumes in the volume-table?&lt;/P&gt;&lt;P&gt;I have tried the following as a calculated column on the product table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Active products = IF(NOT(ISEMPTY('Volume table')),1,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;... but that didn't work.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Jayjay0306&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 12:39:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/filter-from-many-to-one-relation-between-two-tables/m-p/2842497#M90841</guid>
      <dc:creator>jayjay0306</dc:creator>
      <dc:date>2022-10-14T12:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: filter from many to one relation between two tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/filter-from-many-to-one-relation-between-two-tables/m-p/2843026#M90866</link>
      <description>&lt;P&gt;Try changing it to&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Active products = IF(NOT(ISEMPTY(RELATEDTABLE('Volume table'))),1,0)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 14 Oct 2022 16:16:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/filter-from-many-to-one-relation-between-two-tables/m-p/2843026#M90866</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-10-14T16:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: filter from many to one relation between two tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/filter-from-many-to-one-relation-between-two-tables/m-p/2843056#M90870</link>
      <description>&lt;P class="lia-align-justify"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="139186" data-lia-user-login="jayjay0306" class="lia-mention lia-mention-user"&gt;jayjay0306&lt;/a&gt;,&lt;/P&gt;&lt;P class="lia-align-justify"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-justify"&gt;You can use:&lt;/P&gt;&lt;P class="lia-align-justify"&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;Flag = IF(CALCULATE(SUM(Volume[Volume]),FILTER(Volume,'Product'[ID]=Volume[ID]))&amp;gt;0,1,0)&lt;/LI-CODE&gt;&lt;P class="lia-align-justify"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-justify"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;I&gt;Works for you? Mark this post as a solution if it does!&lt;BR /&gt;Consider taking a look at my blog: &lt;LI-MESSAGE title="Forecast Period - Previous Forecasts" uid="2834897" url="https://community.powerbi.com/t5/Themes-Gallery/Forecast-Period-Previous-Forecasts/m-p/2834897#U2834897" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 16:37:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/filter-from-many-to-one-relation-between-two-tables/m-p/2843056#M90870</guid>
      <dc:creator>Shaurya</dc:creator>
      <dc:date>2022-10-14T16:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: filter from many to one relation between two tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/filter-from-many-to-one-relation-between-two-tables/m-p/2845974#M91072</link>
      <description>&lt;P&gt;Thanks Shauya, this works perfectly. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Jayjay0306&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 08:54:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/filter-from-many-to-one-relation-between-two-tables/m-p/2845974#M91072</guid>
      <dc:creator>jayjay0306</dc:creator>
      <dc:date>2022-10-17T08:54:01Z</dc:date>
    </item>
  </channel>
</rss>

