<?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: How to use filters from different tables in CALCULATE? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-filters-from-different-tables-in-CALCULATE/m-p/2773221#M86417</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="372725" data-lia-user-login="hcr4" class="lia-mention lia-mention-user"&gt;hcr4&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It depends on your data model but in general it can and it should. Not sure if the formula that you shared is exactly as what you've been trying or is just a short syntax but the syntax&amp;nbsp;this way is wrong. Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;RevenueSum =
CALCULATE (
    SUM ( OrderLines[Revenue] ),
    'Calendar'[FinancialYear] = 2021,
    'Route'['RouteNo] IN { 160, 161, 162 }
)&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 16 Sep 2022 10:39:41 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-09-16T10:39:41Z</dc:date>
    <item>
      <title>How to use filters from different tables in CALCULATE?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-filters-from-different-tables-in-CALCULATE/m-p/2773200#M86413</link>
      <description>&lt;P&gt;I have an OrderLines tables with a Revenue column. I also have a Calendar table with FinancialYear, and a Route table with RouteNo (certain orders are delivered by certain routes). What I'm wanting to do is sum the Revenue for a specific Financial Year and also specific Route Nos. Here is what I've tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;RevenueSum = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(OrderLines[Revenue]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'Calendar'[FinancialYear] = 2021,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'Route'['RouteNo] = 160 || 161 || 162&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Obviously CALCULATE cannot take two filters from different tables like this. What is the workaround? Alternatively, it might be easier for me to remove the FinancialYear filter and use a slicer for FinancialYear instead, but then I'd have to workout how to prevent CALCULATE from overriding the FinancialYear slicer. Any ideas?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:31:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-filters-from-different-tables-in-CALCULATE/m-p/2773200#M86413</guid>
      <dc:creator>hcr4</dc:creator>
      <dc:date>2022-09-16T10:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use filters from different tables in CALCULATE?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-filters-from-different-tables-in-CALCULATE/m-p/2773221#M86417</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="372725" data-lia-user-login="hcr4" class="lia-mention lia-mention-user"&gt;hcr4&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It depends on your data model but in general it can and it should. Not sure if the formula that you shared is exactly as what you've been trying or is just a short syntax but the syntax&amp;nbsp;this way is wrong. Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;RevenueSum =
CALCULATE (
    SUM ( OrderLines[Revenue] ),
    'Calendar'[FinancialYear] = 2021,
    'Route'['RouteNo] IN { 160, 161, 162 }
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:39:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-use-filters-from-different-tables-in-CALCULATE/m-p/2773221#M86417</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-16T10:39:41Z</dc:date>
    </item>
  </channel>
</rss>

