<?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: DAX filter across 2 tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter-across-2-tables/m-p/1574389#M31415</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="277839" data-lia-user-login="MarcusUK" class="lia-mention lia-mention-user"&gt;MarcusUK&lt;/a&gt; , If they are connected tables &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VOWD ITD C - Non Progress =&lt;BR /&gt;VAR CBS = "Non Progress"&lt;BR /&gt;VAR CAT = "Current Forecast"&lt;BR /&gt;VAR StartDate =&lt;BR /&gt;DATE ( 1900, 1, 1 )&lt;BR /&gt;VAR EndDate =&lt;BR /&gt;DATE ( YEAR('xMeasures - Periods'[Period Current]),MONTH('xMeasures - Periods'[Period Current]), 1 )&lt;BR /&gt;VAR ITDTotal =&lt;BR /&gt;CALCULATE(SUM('Data - Phasing'[Value]),&lt;BR /&gt;DATESBETWEEN ('Data - Phasing'[Period], StartDate, EndDate ),&lt;BR /&gt;FILTER('Data - Phasing','Data - Phasing'[Description] = CAT)&lt;BR /&gt;FILTER('CBS Table','CBS Table'[Non Progress / Progress] = CBS)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;ITDTotal&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they are not connected&amp;nbsp; &lt;BR /&gt;VOWD ITD C - Non Progress =&lt;BR /&gt;VAR CBS = summarize(filter('CBS Table','CBS Table'[Non Progress / Progress] ="Non Progress"),[CBS Code])&lt;BR /&gt;VAR CAT = "Current Forecast"&lt;BR /&gt;VAR StartDate =&lt;BR /&gt;DATE ( 1900, 1, 1 )&lt;BR /&gt;VAR EndDate =&lt;BR /&gt;DATE ( YEAR('xMeasures - Periods'[Period Current]),MONTH('xMeasures - Periods'[Period Current]), 1 )&lt;BR /&gt;VAR ITDTotal =&lt;BR /&gt;CALCULATE(SUM('Data - Phasing'[Value]),&lt;BR /&gt;DATESBETWEEN ('Data - Phasing'[Period], StartDate, EndDate ),&lt;BR /&gt;FILTER('Data - Phasing','Data - Phasing'[Description] = CAT &amp;amp;&amp;amp; 'Data - Phasing'[CBS Code] in CBS )&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;ITDTotal&lt;/P&gt;</description>
    <pubDate>Wed, 30 Dec 2020 04:28:30 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-12-30T04:28:30Z</dc:date>
    <item>
      <title>DAX filter across 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter-across-2-tables/m-p/1573699#M31387</link>
      <description>&lt;P&gt;Hello everyone, I really need someone's help here as I am struggling with thsi DAX formula. I have these tables below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data table called "data - phasing"&lt;/P&gt;&lt;P&gt;Period table called "xMeasures - Periods"&lt;/P&gt;&lt;P&gt;CBS Code table called "ref - CBS Table"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also have this current DAX formula which works fine fine at the moment and returns the ITD VOWD for the Current Forecast that is coming from the data - phasing tab.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now need to also filter on "Non Progress" but this field is not in the data - phasing table, the field is in the ref - CBS Table and is linked to the CBS Code, which is in both the data - phasing and ref - CBS Table. All tables are linked to the ref - CBS Table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the DAX I have right now which works well but I cant work out how to add the additional filter to include Non Progress only&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this DAX formula below which works perfect at the moment. However, I now want to filter another value from a different table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VOWD ITD C - Non Progress = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR CBS = "Non Progress"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR CAT = "Current Forecast"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR StartDate =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATE ( 1900, 1, 1 )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR EndDate =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATE ( YEAR('xMeasures - Periods'[Period Current]),MONTH('xMeasures - Periods'[Period Current]), 1 )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR ITDTotal =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(SUM('Data - Phasing'[Value]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DATESBETWEEN ('Data - Phasing'[Period], StartDate, EndDate ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER('Data - Phasing','Data - Phasing'[Description] = CAT)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ITDTotal&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 29 Dec 2020 16:29:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter-across-2-tables/m-p/1573699#M31387</guid>
      <dc:creator>MarcusUK</dc:creator>
      <dc:date>2020-12-29T16:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: DAX filter across 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter-across-2-tables/m-p/1573786#M31389</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="277839" data-lia-user-login="MarcusUK" class="lia-mention lia-mention-user"&gt;MarcusUK&lt;/a&gt;&amp;nbsp;Sorry, having trouble following, can you post sample data as text and expected output?&lt;BR /&gt;Not really enough information to go on, please first check if your issue is a common issue listed here: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The most important parts are:&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 17:17:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter-across-2-tables/m-p/1573786#M31389</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-12-29T17:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: DAX filter across 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter-across-2-tables/m-p/1573892#M31397</link>
      <description>&lt;P&gt;Hi Greg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for getting back to me so soon, I hope I have explined this clearly enough &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;Greg I am getting this error when trying to send the message&lt;/P&gt;&lt;P&gt;Your post has been changed because invalid HTML was found in the message body. The invalid HTML has been removed. Please review the message and submit the message when you are satisfied.&lt;/P&gt;&lt;P&gt;I had to remove the tables,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ref - CBS Table&lt;BR /&gt;CBS Code&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Non Progress / Progress&lt;BR /&gt;1100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Progress&lt;BR /&gt;1200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Non Progess&lt;BR /&gt;1300&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Non Progress&lt;BR /&gt;1400&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Progress&lt;BR /&gt;1500&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Non Progress&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data - Phasing&lt;BR /&gt;CBS Code&amp;nbsp; &amp;nbsp; &amp;nbsp; Period&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Description&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Amount&lt;BR /&gt;1100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01/01/20&amp;nbsp; &amp;nbsp;Current Forecast&amp;nbsp; &amp;nbsp; 100&lt;BR /&gt;1100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01/01/20&amp;nbsp; &amp;nbsp;Previous Forecast&amp;nbsp; &amp;nbsp;200&lt;BR /&gt;1200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01/10/21&amp;nbsp; &amp;nbsp;Current Forecast&amp;nbsp; &amp;nbsp; 300&lt;BR /&gt;1200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01/10/21&amp;nbsp; &amp;nbsp;Previous Forecast&amp;nbsp; &amp;nbsp;600&lt;BR /&gt;1300&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01/08/20&amp;nbsp; &amp;nbsp;Current Forecast&amp;nbsp; &amp;nbsp; 200&lt;BR /&gt;1300&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01/08/20&amp;nbsp; &amp;nbsp;Previous Forecast&amp;nbsp; &amp;nbsp;400&lt;BR /&gt;1400&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01/05/20&amp;nbsp; &amp;nbsp;Current Forecast&amp;nbsp; &amp;nbsp; &amp;nbsp;300&lt;BR /&gt;1400&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01/05/20&amp;nbsp; &amp;nbsp;Previous Forecast&amp;nbsp; &amp;nbsp; 300&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Above is the main data which I am trying to filter from table Data - Phasing. There is another Period table but too much to include here but basically the Var start date is right from the beginning and the Var end date which returns the 31/12/20, this is working fine right now&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently the DAX formula will return the below:&lt;BR /&gt;a) Up to 31/12/20&lt;BR /&gt;b) Current Forecast ONLY&lt;BR /&gt;This returned a value of = 600&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I now need to add an additional filter, filtering data referencing the Ref - CBS Table and only calculate the Non Progress CBS Codes (these are mapped / linked to each other). This would then give me a result of = 200&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I add one more filter that filters out the Non Progress CBS codes that are linked to the CBS codes in the Data - Phasing table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Greg&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 18:44:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter-across-2-tables/m-p/1573892#M31397</guid>
      <dc:creator>MarcusUK</dc:creator>
      <dc:date>2020-12-29T18:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: DAX filter across 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter-across-2-tables/m-p/1574389#M31415</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="277839" data-lia-user-login="MarcusUK" class="lia-mention lia-mention-user"&gt;MarcusUK&lt;/a&gt; , If they are connected tables &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VOWD ITD C - Non Progress =&lt;BR /&gt;VAR CBS = "Non Progress"&lt;BR /&gt;VAR CAT = "Current Forecast"&lt;BR /&gt;VAR StartDate =&lt;BR /&gt;DATE ( 1900, 1, 1 )&lt;BR /&gt;VAR EndDate =&lt;BR /&gt;DATE ( YEAR('xMeasures - Periods'[Period Current]),MONTH('xMeasures - Periods'[Period Current]), 1 )&lt;BR /&gt;VAR ITDTotal =&lt;BR /&gt;CALCULATE(SUM('Data - Phasing'[Value]),&lt;BR /&gt;DATESBETWEEN ('Data - Phasing'[Period], StartDate, EndDate ),&lt;BR /&gt;FILTER('Data - Phasing','Data - Phasing'[Description] = CAT)&lt;BR /&gt;FILTER('CBS Table','CBS Table'[Non Progress / Progress] = CBS)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;ITDTotal&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they are not connected&amp;nbsp; &lt;BR /&gt;VOWD ITD C - Non Progress =&lt;BR /&gt;VAR CBS = summarize(filter('CBS Table','CBS Table'[Non Progress / Progress] ="Non Progress"),[CBS Code])&lt;BR /&gt;VAR CAT = "Current Forecast"&lt;BR /&gt;VAR StartDate =&lt;BR /&gt;DATE ( 1900, 1, 1 )&lt;BR /&gt;VAR EndDate =&lt;BR /&gt;DATE ( YEAR('xMeasures - Periods'[Period Current]),MONTH('xMeasures - Periods'[Period Current]), 1 )&lt;BR /&gt;VAR ITDTotal =&lt;BR /&gt;CALCULATE(SUM('Data - Phasing'[Value]),&lt;BR /&gt;DATESBETWEEN ('Data - Phasing'[Period], StartDate, EndDate ),&lt;BR /&gt;FILTER('Data - Phasing','Data - Phasing'[Description] = CAT &amp;amp;&amp;amp; 'Data - Phasing'[CBS Code] in CBS )&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;ITDTotal&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 04:28:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter-across-2-tables/m-p/1574389#M31415</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-12-30T04:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: DAX filter across 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter-across-2-tables/m-p/1574429#M31417</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I must have been really tired yesterday or was missing something very silly. I tried both those solutions yesterday and none of them worked and today it did &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;Thank you so much for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 05:16:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-filter-across-2-tables/m-p/1574429#M31417</guid>
      <dc:creator>MarcusUK</dc:creator>
      <dc:date>2020-12-30T05:16:10Z</dc:date>
    </item>
  </channel>
</rss>

