<?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 Nested filters for case like statement in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-filters-for-case-like-statement/m-p/1899085#M40950</link>
    <description>&lt;P&gt;I have two lines of business and I want to summarize values over the combined lines of business. This data lives in the same table but some attributes only apply to one or the other business&amp;nbsp;line. Both lines of business share some common rules which I filter on using calculate in a measure. One of the business&amp;nbsp;lines has a filter unique to it. I am trying to figure out the best way to write a measure that first uses the common filters, but for one line of business add a second filter that won't filter out the rest of the totals for the other business line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current measure incorporates only the common filters:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have:&lt;/P&gt;&lt;P&gt;TotalSales:=CALCULATE ( SUM(SalesTotal), CommonFilterA= 1, CommonFilterB = 2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need to add:&lt;/P&gt;&lt;P&gt;&amp;lt;Filter Condition&amp;gt; When BusinessLineId = 2 then SUM(TotalSales) where the SalesType = Retail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to add a filter that applies to only one of the two business lines. I need to be able to summarize SalesTotals for both lines of business. I was hoping there was a way I could do this without creating two measures, one for each business line, and then summarizing both. Is there a way to write this in a single DAX statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Jun 2021 14:09:40 GMT</pubDate>
    <dc:creator>PBInterest</dc:creator>
    <dc:date>2021-06-14T14:09:40Z</dc:date>
    <item>
      <title>Nested filters for case like statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-filters-for-case-like-statement/m-p/1899085#M40950</link>
      <description>&lt;P&gt;I have two lines of business and I want to summarize values over the combined lines of business. This data lives in the same table but some attributes only apply to one or the other business&amp;nbsp;line. Both lines of business share some common rules which I filter on using calculate in a measure. One of the business&amp;nbsp;lines has a filter unique to it. I am trying to figure out the best way to write a measure that first uses the common filters, but for one line of business add a second filter that won't filter out the rest of the totals for the other business line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current measure incorporates only the common filters:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have:&lt;/P&gt;&lt;P&gt;TotalSales:=CALCULATE ( SUM(SalesTotal), CommonFilterA= 1, CommonFilterB = 2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need to add:&lt;/P&gt;&lt;P&gt;&amp;lt;Filter Condition&amp;gt; When BusinessLineId = 2 then SUM(TotalSales) where the SalesType = Retail.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to add a filter that applies to only one of the two business lines. I need to be able to summarize SalesTotals for both lines of business. I was hoping there was a way I could do this without creating two measures, one for each business line, and then summarizing both. Is there a way to write this in a single DAX statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 14:09:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-filters-for-case-like-statement/m-p/1899085#M40950</guid>
      <dc:creator>PBInterest</dc:creator>
      <dc:date>2021-06-14T14:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Nested filters for case like statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-filters-for-case-like-statement/m-p/1899558#M40957</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="295719" data-lia-user-login="PBInterest" class="lia-mention lia-mention-user"&gt;PBInterest&lt;/a&gt; , based on what I got &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;calculate([TotalSales],filter(Table, [BusinessLineId] &amp;lt;&amp;gt; 2)) + calculate([TotalSales],filter(Table, [BusinessLineId] = 2 &amp;amp;&amp;amp; [SalesType] = "Retail" ))&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 17:40:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-filters-for-case-like-statement/m-p/1899558#M40957</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-06-14T17:40:40Z</dc:date>
    </item>
  </channel>
</rss>

