<?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: Periodic Billing in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/3195595#M972</link>
    <description>&lt;P&gt;Hello!&amp;nbsp;&lt;BR /&gt;thank for sharing!&lt;BR /&gt;I have a question. I have a similar problem, just my payment is once per year for all 12 months. The question is when I open your pbix all works as it should, but when I use FORMAT to get YearMonth I've got a mistake "could not convert text to number" that is the reason why FILTER does not work. Did you do somthening special to fix it?&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2023 10:54:21 GMT</pubDate>
    <dc:creator>Elvi_well</dc:creator>
    <dc:date>2023-04-19T10:54:21Z</dc:date>
    <item>
      <title>Periodic Billing</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365#M148</link>
      <description>&lt;P&gt;Again, thanks to&amp;nbsp;&lt;A title="" href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/3459" target="_blank"&gt;@Phil_Seamark&lt;/A&gt;'s insightful guidance and examples in his fantastic new book, &lt;A title="" href="https://www.amazon.com/dp/1484234766/" target="_self" rel="nofollow noopener noreferrer"&gt;Beginning DAX with Power BI: The SQL Pro’s Guide to Better Business Intelligence&lt;/A&gt;, I finally "get" the GENERATE function and how it can be used to elegantly solve&amp;nbsp;problems that have vexed me since almost the very first Power BI model that I ever built, dealing with data that contains date ranges. This one uses the same technique as Open Tickets but puts a different spin on it by also requiring that there be a periodic element to the totals calculation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following measure assumes a disconnected date table and data that involves billing starting and ending dates with a monthly fee. The measure computes the total revenue within any particular month, which can then be plotted. Also nifty.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Total Amount = 
VAR tmpCalendar = ADDCOLUMNS('Calendar',"Month",MONTH([Date]),"Year",YEAR([Date]),"MonthYear",VALUE(YEAR([Date]) &amp;amp; FORMAT(MONTH([Date]),"0#")))
VAR tmpBilling = ADDCOLUMNS('Billing',"MonthYearBegin",VALUE(YEAR([BeginDate]) &amp;amp; FORMAT(MONTH([BeginDate]),"0#")),
                                      "MonthYearEnd",VALUE(YEAR([UntilDate]) &amp;amp; FORMAT(MONTH([UntilDate]),"0#")))
VAR tmpTable = 
SELECTCOLUMNS(
    FILTER(
        GENERATE(
            tmpBilling,
            SUMMARIZE(tmpCalendar,[Year],[Month],[MonthYear])
        ),
        [MonthYear] &amp;gt;= [MonthYearBegin] &amp;amp;&amp;amp;
        [MonthYear] &amp;lt;= [MonthYearEnd]
    ),
    "Customer",[Customer],
    "Year",[Year],
    "Month",[Month],
    "Amount",[Amount]
)
RETURN SUMX(tmpTable,[Amount])&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, if&lt;SPAN&gt; you are only going to own one DAX book, IMHO, Phil's is the book you want!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiN2IyMGNlYmItZjhjNi00M2IxLWI1MDAtZmVkMzIxMjkzNmFhIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 17:13:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365#M148</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-06-26T17:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Periodic Billing</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/3195595#M972</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;BR /&gt;thank for sharing!&lt;BR /&gt;I have a question. I have a similar problem, just my payment is once per year for all 12 months. The question is when I open your pbix all works as it should, but when I use FORMAT to get YearMonth I've got a mistake "could not convert text to number" that is the reason why FILTER does not work. Did you do somthening special to fix it?&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 10:54:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/3195595#M972</guid>
      <dc:creator>Elvi_well</dc:creator>
      <dc:date>2023-04-19T10:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Periodic Billing</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/3708863#M1048</link>
      <description>&lt;P&gt;This is one of the big problem I was fighting against since the first time I've started using PowerBI and DAX. The solution it's absolutely impressive for its semplicity and elegant.&lt;/P&gt;&lt;P&gt;Thank you for sharing it, really appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2024 18:49:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/3708863#M1048</guid>
      <dc:creator>marsorre</dc:creator>
      <dc:date>2024-02-19T18:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Periodic Billing</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/4682115#M1167</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your point of view, both the example and the book have been very useful. However, I've found a case were I cannot find a solution. You specify that the table of tickets and the calendar table are NOT connected, but what would you do in the case they are? I need a common filter for the creation date calendar date but creating a relation breaks the measure.&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 14:32:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/4682115#M1167</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-06T14:32:22Z</dc:date>
    </item>
  </channel>
</rss>

