<?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 Calculate all invoices except &amp;quot;Cancelled&amp;quot; in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-all-invoices-except-quot-Cancelled-quot/m-p/3035284#M103906</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am very new to DAX and Power Pivot and I'm trying to build a measure where I count all the invoices with status "open", "sent", "paid" and "overdue". I want my measure to ignore "cancelled" status of invoices.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created this, but I am worried that it's inefficient because it uses Filter funcion in my measure.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;!--  StartFragment   --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;SUM&lt;/SPAN&gt;&lt;SPAN class=""&gt;(f_invoices[revenue_czk]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp;FILTER&lt;/SPAN&gt;&lt;SPAN class=""&gt;(f_invoices, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; f_invoices[invoice_status]= &lt;/SPAN&gt;&lt;SPAN class=""&gt;"open"&lt;/SPAN&gt;&lt;SPAN class=""&gt; || &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; f_invoices[invoice_status]= &lt;/SPAN&gt;&lt;SPAN class=""&gt;"paid"&lt;/SPAN&gt;&lt;SPAN class=""&gt; ||&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; f_invoices[invoice_status]= &lt;/SPAN&gt;&lt;SPAN class=""&gt;"sent"&lt;/SPAN&gt;&lt;SPAN class=""&gt; ||&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; f_invoices[invoice_status]= &lt;/SPAN&gt;&lt;SPAN class=""&gt;"overdue"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it OK to use filter in such scenario or would you suggest something to make my measure more simple and resources efficient?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 21 Jan 2023 10:53:40 GMT</pubDate>
    <dc:creator>Peter65f1</dc:creator>
    <dc:date>2023-01-21T10:53:40Z</dc:date>
    <item>
      <title>Calculate all invoices except "Cancelled"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-all-invoices-except-quot-Cancelled-quot/m-p/3035284#M103906</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am very new to DAX and Power Pivot and I'm trying to build a measure where I count all the invoices with status "open", "sent", "paid" and "overdue". I want my measure to ignore "cancelled" status of invoices.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created this, but I am worried that it's inefficient because it uses Filter funcion in my measure.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;!--  StartFragment   --&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt;&lt;SPAN class=""&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;SUM&lt;/SPAN&gt;&lt;SPAN class=""&gt;(f_invoices[revenue_czk]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp;FILTER&lt;/SPAN&gt;&lt;SPAN class=""&gt;(f_invoices, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; f_invoices[invoice_status]= &lt;/SPAN&gt;&lt;SPAN class=""&gt;"open"&lt;/SPAN&gt;&lt;SPAN class=""&gt; || &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; f_invoices[invoice_status]= &lt;/SPAN&gt;&lt;SPAN class=""&gt;"paid"&lt;/SPAN&gt;&lt;SPAN class=""&gt; ||&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; f_invoices[invoice_status]= &lt;/SPAN&gt;&lt;SPAN class=""&gt;"sent"&lt;/SPAN&gt;&lt;SPAN class=""&gt; ||&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; f_invoices[invoice_status]= &lt;/SPAN&gt;&lt;SPAN class=""&gt;"overdue"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;!--  EndFragment   --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it OK to use filter in such scenario or would you suggest something to make my measure more simple and resources efficient?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2023 10:53:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-all-invoices-except-quot-Cancelled-quot/m-p/3035284#M103906</guid>
      <dc:creator>Peter65f1</dc:creator>
      <dc:date>2023-01-21T10:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate all invoices except "Cancelled"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-all-invoices-except-quot-Cancelled-quot/m-p/3035291#M103909</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="502433" data-lia-user-login="Peter65f1" class="lia-mention lia-mention-user"&gt;Peter65f1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it is OK.&amp;nbsp;&lt;/P&gt;&lt;P&gt;you may make it more concise like this&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;measure =&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SUM&lt;/SPAN&gt;&lt;SPAN class=""&gt;(f_invoices[revenue_czk]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;f_invoices[invoice_status] IN&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;{&lt;/SPAN&gt;&lt;SPAN class=""&gt;"open",&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;"paid",&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"sent"&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"overdue"}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;measure = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;SUM&lt;/SPAN&gt;&lt;SPAN class=""&gt;(f_invoices[revenue_czk]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;f_invoices[invoice_status] &amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"cancelled"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 21 Jan 2023 11:19:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-all-invoices-except-quot-Cancelled-quot/m-p/3035291#M103909</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-21T11:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate all invoices except "Cancelled"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-all-invoices-except-quot-Cancelled-quot/m-p/3035294#M103911</link>
      <description>&lt;P&gt;Thank you, the second one is very ellegant because it takes care of potential new invoice statuses in the future. Great solution, have a great day &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jan 2023 11:28:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-all-invoices-except-quot-Cancelled-quot/m-p/3035294#M103911</guid>
      <dc:creator>Peter65f1</dc:creator>
      <dc:date>2023-01-21T11:28:23Z</dc:date>
    </item>
  </channel>
</rss>

