<?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: Select all invoices between posting date and selected period in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Select-all-invoices-between-posting-date-and-selected-period/m-p/2586130#M74373</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="352772" data-lia-user-login="Khalidc" class="lia-mention lia-mention-user"&gt;Khalidc&lt;/a&gt;&amp;nbsp;- I am not sure about the VAR for post and close period.&amp;nbsp; Would something like the following work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Account Receivable Subledger = &lt;BR /&gt;VAR _period = SELECTEDVALUE ( Visma_financialperiod[Period] , MAX ( Visma_financialperiod[Period] ) )&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE ( SUM ( Visma_customerInvoice[Amount] ) , &lt;BR /&gt;       Visma_customerInvoice[postperiod adj] &amp;lt;= _period , &lt;BR /&gt;       Visma_customerInvoice[closedfinancialperiod] &amp;gt; _period  || &lt;BR /&gt;       ISBLANK( Visma_customerInvoice[closedfinancialperiod] &lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 16:58:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-06-17T16:58:12Z</dc:date>
    <item>
      <title>Select all invoices between posting date and selected period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Select-all-invoices-between-posting-date-and-selected-period/m-p/2586000#M74370</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a sales invoice table presenting all historic invoices "CustomerInvoice". The invoice table has a column "posting period" and a column "closing period". The posting period is the period the invoice was posted, and closing is the period where the cash was received and invoice closed. I would like to populate an invoice subledger based on the selected period in a slicer which is coming from the period date table "visma_ financialPeriod".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created the following measure but it only returns the invoices having posting periods = selected financialperiod and not the invoices which where posted before the selected financial period:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It must be easy to solve, but I just cannot see it at this moment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 15:30:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Select-all-invoices-between-posting-date-and-selected-period/m-p/2586000#M74370</guid>
      <dc:creator>Khalidc</dc:creator>
      <dc:date>2022-06-17T15:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Select all invoices between posting date and selected period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Select-all-invoices-between-posting-date-and-selected-period/m-p/2586130#M74373</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="352772" data-lia-user-login="Khalidc" class="lia-mention lia-mention-user"&gt;Khalidc&lt;/a&gt;&amp;nbsp;- I am not sure about the VAR for post and close period.&amp;nbsp; Would something like the following work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Account Receivable Subledger = &lt;BR /&gt;VAR _period = SELECTEDVALUE ( Visma_financialperiod[Period] , MAX ( Visma_financialperiod[Period] ) )&lt;BR /&gt;RETURN&lt;BR /&gt;CALCULATE ( SUM ( Visma_customerInvoice[Amount] ) , &lt;BR /&gt;       Visma_customerInvoice[postperiod adj] &amp;lt;= _period , &lt;BR /&gt;       Visma_customerInvoice[closedfinancialperiod] &amp;gt; _period  || &lt;BR /&gt;       ISBLANK( Visma_customerInvoice[closedfinancialperiod] &lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 16:58:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Select-all-invoices-between-posting-date-and-selected-period/m-p/2586130#M74373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-17T16:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Select all invoices between posting date and selected period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Select-all-invoices-between-posting-date-and-selected-period/m-p/2586431#M74399</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First it returned the exact same result but after adding the ALL() to it, it worked, see in red!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&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;Visma_customerInvoice[amount]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF0000"&gt;all(Visma_financialPeriod),&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Visma_customerInvoice[postperiod adj]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;_period&lt;/SPAN&gt;&lt;SPAN&gt; ,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Visma_customerInvoice[closedFinancialPeriod]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;_period&lt;/SPAN&gt;&lt;SPAN&gt; ||&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;isblank&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;Visma_customerInvoice[closedFinancialPeriod]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 22:22:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Select-all-invoices-between-posting-date-and-selected-period/m-p/2586431#M74399</guid>
      <dc:creator>Khalidc</dc:creator>
      <dc:date>2022-06-17T22:22:35Z</dc:date>
    </item>
  </channel>
</rss>

