<?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: How to calculate penetration of the company in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-penetration-of-the-company/m-p/3033134#M103770</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="501768" data-lia-user-login="Layziane" class="lia-mention lia-mention-user"&gt;Layziane&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Due to I don't know your data model, here I create a sample to have a test.&lt;/P&gt;
&lt;P&gt;Company:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Contracts:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;DimDate:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DimDate = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"YearMonth",YEAR([Date])*100+MONTH([Date]))&lt;/LI-CODE&gt;
&lt;P&gt;Relationship:&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _COMPANY =
    CALCULATE (
        COUNT ( Company[Company] ),
        FILTER ( ALL ( Company ), Company[Start Date] &amp;lt;= MIN ( DimDate[Date] ) )
    )
VAR _CUSTOMER = 100
VAR _CONTRACTS =
    CALCULATE (
        SUM ( Contracts[Contracts] ),
        FILTER (
            Contracts,
            Contracts[YearMonth] = SELECTEDVALUE ( DimDate[YearMonth] )
        )
    )
RETURN
    DIVIDE ( _CONTRACTS, _COMPANY * _CUSTOMER )&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jan 2023 06:31:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-20T06:31:40Z</dc:date>
    <item>
      <title>How to calculate penetration of the company</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-penetration-of-the-company/m-p/3032400#M103704</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I need help for make a DAX about penetration.&lt;BR /&gt;Our database have several companies and the date are different that these companies start the operations.&lt;BR /&gt;For example, the "Company A" starts in october and the "Company B" starts in december. So, I need to calculate the penetranion from when the company enters.&lt;BR /&gt;Another example, in april have 10 companies with the total of 100 customers each (total of 1000 customers) and we made 250 contracts, the penetration is 25%.&lt;BR /&gt;In may enters a new company and we have 11 companies with 100 customers each (total of 1000 customers) and we made 250 contracts, the penetration is 22%.&amp;nbsp;&lt;BR /&gt;But if we want to calculate the penetration of april in november, we can't considerate the companies that starts after april.&lt;BR /&gt;In resume, we need just calculate the penetration when the company starts starts his operation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 20:24:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-penetration-of-the-company/m-p/3032400#M103704</guid>
      <dc:creator>Layziane</dc:creator>
      <dc:date>2023-01-19T20:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate penetration of the company</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-penetration-of-the-company/m-p/3032980#M103768</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="501768" data-lia-user-login="Layziane" class="lia-mention lia-mention-user"&gt;Layziane&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please provide sample Data.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 04:53:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-penetration-of-the-company/m-p/3032980#M103768</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T04:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate penetration of the company</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-penetration-of-the-company/m-p/3033134#M103770</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="501768" data-lia-user-login="Layziane" class="lia-mention lia-mention-user"&gt;Layziane&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Due to I don't know your data model, here I create a sample to have a test.&lt;/P&gt;
&lt;P&gt;Company:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Contracts:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;DimDate:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DimDate = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"YearMonth",YEAR([Date])*100+MONTH([Date]))&lt;/LI-CODE&gt;
&lt;P&gt;Relationship:&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _COMPANY =
    CALCULATE (
        COUNT ( Company[Company] ),
        FILTER ( ALL ( Company ), Company[Start Date] &amp;lt;= MIN ( DimDate[Date] ) )
    )
VAR _CUSTOMER = 100
VAR _CONTRACTS =
    CALCULATE (
        SUM ( Contracts[Contracts] ),
        FILTER (
            Contracts,
            Contracts[YearMonth] = SELECTEDVALUE ( DimDate[YearMonth] )
        )
    )
RETURN
    DIVIDE ( _CONTRACTS, _COMPANY * _CUSTOMER )&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 06:31:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-penetration-of-the-company/m-p/3033134#M103770</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T06:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate penetration of the company</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-penetration-of-the-company/m-p/3033834#M103805</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The "dataSolicitacaoEmprestino" is the date with the company starts, just start with the firts contract&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 12:05:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-penetration-of-the-company/m-p/3033834#M103805</guid>
      <dc:creator>Layziane</dc:creator>
      <dc:date>2023-01-20T12:05:22Z</dc:date>
    </item>
  </channel>
</rss>

