<?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: average default of payment per customer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/average-default-of-payment-per-customer/m-p/3591316#M138665</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Certainly! It seems like you want to calculate the average default of payment for each customer based on their invoices. To achieve this, you'll need to create a new measure that calculates the average default of payment for each customer. Assuming you have a table named "Invoices" with columns like "CustomerID," "InvoiceAmount," and "DefaultOfPayment," you can create the following DAX measure:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;DAX Measure:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AverageDefaultOfPaymentPerCustomer =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;AVERAGE('Invoices'[DefaultOfPayment]),&lt;BR /&gt;ALLEXCEPT('Invoices', 'Invoices'[CustomerID])&lt;BR /&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Here's what this measure does:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;CALCULATE: It modifies the context in which the calculation is made.&lt;/LI&gt;&lt;LI&gt;AVERAGE('Invoices'[DefaultOfPayment]): It calculates the average of the "DefaultOfPayment" column in the "Invoices" table.&lt;/LI&gt;&lt;LI&gt;ALLEXCEPT('Invoices', 'Invoices'[CustomerID]): It removes all filters from the "Invoices" table except for the "CustomerID" column. This ensures that the average is calculated for each customer.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Now, you can use this measure in your table visual alongside the "CustomerID" and other relevant columns. It will show the average default of payment for each customer based on their invoices.&lt;/P&gt;&lt;P&gt;Make sure to adjust the table relationships and column names in the DAX measure according to your data model. If you have a different table structure or column names, you might need to modify the measure accordingly.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 19 Dec 2023 13:19:47 GMT</pubDate>
    <dc:creator>123abc</dc:creator>
    <dc:date>2023-12-19T13:19:47Z</dc:date>
    <item>
      <title>average default of payment per customer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/average-default-of-payment-per-customer/m-p/3590839#M138629</link>
      <description>&lt;P&gt;Hello everybody&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have measure that calculates the average default of payment by invoice.&lt;/P&gt;&lt;P&gt;I would like to have a table with invoices and&amp;nbsp;the average default of payment for the certain customer (to see whehter I can expect a receipt of payment).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I add the measure to a visual (table) with the invoices it shows the average by invoice (which is empty because there has not been a payment yet).&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Is it possible to build a measure that calculates the average default of payment for the customer that belongs to an invoice (not for the invoice itself)? If it works there the value cannot be empty if the customer has ever paid any invoice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 09:31:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/average-default-of-payment-per-customer/m-p/3590839#M138629</guid>
      <dc:creator>MS2121</dc:creator>
      <dc:date>2023-12-19T09:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: average default of payment per customer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/average-default-of-payment-per-customer/m-p/3591316#M138665</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Certainly! It seems like you want to calculate the average default of payment for each customer based on their invoices. To achieve this, you'll need to create a new measure that calculates the average default of payment for each customer. Assuming you have a table named "Invoices" with columns like "CustomerID," "InvoiceAmount," and "DefaultOfPayment," you can create the following DAX measure:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;DAX Measure:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AverageDefaultOfPaymentPerCustomer =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;AVERAGE('Invoices'[DefaultOfPayment]),&lt;BR /&gt;ALLEXCEPT('Invoices', 'Invoices'[CustomerID])&lt;BR /&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Here's what this measure does:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;CALCULATE: It modifies the context in which the calculation is made.&lt;/LI&gt;&lt;LI&gt;AVERAGE('Invoices'[DefaultOfPayment]): It calculates the average of the "DefaultOfPayment" column in the "Invoices" table.&lt;/LI&gt;&lt;LI&gt;ALLEXCEPT('Invoices', 'Invoices'[CustomerID]): It removes all filters from the "Invoices" table except for the "CustomerID" column. This ensures that the average is calculated for each customer.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Now, you can use this measure in your table visual alongside the "CustomerID" and other relevant columns. It will show the average default of payment for each customer based on their invoices.&lt;/P&gt;&lt;P&gt;Make sure to adjust the table relationships and column names in the DAX measure according to your data model. If you have a different table structure or column names, you might need to modify the measure accordingly.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 19 Dec 2023 13:19:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/average-default-of-payment-per-customer/m-p/3591316#M138665</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-12-19T13:19:47Z</dc:date>
    </item>
  </channel>
</rss>

