<?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 Filter data in a measure if either condition is met in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-data-in-a-measure-if-either-condition-is-met/m-p/3452385#M131540</link>
    <description>&lt;P&gt;Very new to power BI.&amp;nbsp; Getting my feet wet.&amp;nbsp; I created the following measure to calculate a sales total from two different fact tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RankedSales =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SalesData&lt;/SPAN&gt;&lt;SPAN&gt;[Sales]&lt;/SPAN&gt;&lt;SPAN&gt;)) + &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'NCS&amp;nbsp; Sales'&lt;/SPAN&gt;&lt;SPAN&gt;[Sales]&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;I have two other fields that that determine if the sales are to be included.&amp;nbsp; If either of these are not the values below, they do not count for this measure.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Distributor[Include in Rankings?] = "Y"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Windfalls[Exclude Windfall?] = ""&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can I incorporate this into the measure?&amp;nbsp; Thanks in advance&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 28 Sep 2023 20:21:48 GMT</pubDate>
    <dc:creator>MikeGeno</dc:creator>
    <dc:date>2023-09-28T20:21:48Z</dc:date>
    <item>
      <title>Filter data in a measure if either condition is met</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-data-in-a-measure-if-either-condition-is-met/m-p/3452385#M131540</link>
      <description>&lt;P&gt;Very new to power BI.&amp;nbsp; Getting my feet wet.&amp;nbsp; I created the following measure to calculate a sales total from two different fact tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RankedSales =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SalesData&lt;/SPAN&gt;&lt;SPAN&gt;[Sales]&lt;/SPAN&gt;&lt;SPAN&gt;)) + &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'NCS&amp;nbsp; Sales'&lt;/SPAN&gt;&lt;SPAN&gt;[Sales]&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;I have two other fields that that determine if the sales are to be included.&amp;nbsp; If either of these are not the values below, they do not count for this measure.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Distributor[Include in Rankings?] = "Y"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Windfalls[Exclude Windfall?] = ""&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Can I incorporate this into the measure?&amp;nbsp; Thanks in advance&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Sep 2023 20:21:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-data-in-a-measure-if-either-condition-is-met/m-p/3452385#M131540</guid>
      <dc:creator>MikeGeno</dc:creator>
      <dc:date>2023-09-28T20:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filter data in a measure if either condition is met</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-data-in-a-measure-if-either-condition-is-met/m-p/3452780#M131556</link>
      <description>&lt;P&gt;As long as all of these tables are connected this should work:&lt;BR /&gt;&lt;SPAN&gt;RankedSales = CALCULATE( SUM(SalesData[Sales]) + SUM('NCS Sales'[Sales]), FILTER( ALL('Distributor', 'Windfalls'), 'Distributor'[Include in Rankings?] = "Y" &amp;amp;&amp;amp; 'Windfalls'[Exclude Windfall?] = "" ) )&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 03:11:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-data-in-a-measure-if-either-condition-is-met/m-p/3452780#M131556</guid>
      <dc:creator>SQL_SousChef</dc:creator>
      <dc:date>2023-09-29T03:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Filter data in a measure if either condition is met</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-data-in-a-measure-if-either-condition-is-met/m-p/3453796#M131603</link>
      <description>&lt;LI-CODE lang="markup"&gt;RankedSales = CALCULATE(
	SUM(SalesData[Sales]) + SUM('NCS  Sales'[Sales])
	,Distributor[Include in Rankings?] = "Y"
	,Windfalls[Exclude Windfall?] = ""
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 29 Sep 2023 15:24:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-data-in-a-measure-if-either-condition-is-met/m-p/3453796#M131603</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2023-09-29T15:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Filter data in a measure if either condition is met</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-data-in-a-measure-if-either-condition-is-met/m-p/3459582#M131942</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp; This worked&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 13:43:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-data-in-a-measure-if-either-condition-is-met/m-p/3459582#M131942</guid>
      <dc:creator>MikeGeno</dc:creator>
      <dc:date>2023-10-04T13:43:19Z</dc:date>
    </item>
  </channel>
</rss>

