Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Layziane
New Member

How to calculate penetration of the company

Hello, 

I need help for make a DAX about penetration.
Our database have several companies and the date are different that these companies start the operations.
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.
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%.
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%. 
But if we want to calculate the penetration of april in november, we can't considerate the companies that starts after april.
In resume, we need just calculate the penetration when the company starts starts his operation. 

3 REPLIES 3
Anonymous
Not applicable

Hi @Layziane ,

 

Due to I don't know your data model, here I create a sample to have a test.

Company:

RicoZhou_0-1674196103022.png

Contracts:

RicoZhou_1-1674196119673.png

DimDate:

DimDate = ADDCOLUMNS(CALENDARAUTO(),"Year",YEAR([Date]),"Month",MONTH([Date]),"YearMonth",YEAR([Date])*100+MONTH([Date]))

Relationship:
RicoZhou_2-1674196138907.png

Measure:

Measure = 
VAR _COMPANY =
    CALCULATE (
        COUNT ( Company[Company] ),
        FILTER ( ALL ( Company ), Company[Start Date] <= MIN ( DimDate[Date] ) )
    )
VAR _CUSTOMER = 100
VAR _CONTRACTS =
    CALCULATE (
        SUM ( Contracts[Contracts] ),
        FILTER (
            Contracts,
            Contracts[YearMonth] = SELECTEDVALUE ( DimDate[YearMonth] )
        )
    )
RETURN
    DIVIDE ( _CONTRACTS, _COMPANY * _CUSTOMER )

Result is as below.

RicoZhou_3-1674196275582.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Hi @Layziane 

Can you please provide sample Data.

Layziane_0-1674216242705.png


The "dataSolicitacaoEmprestino" is the date with the company starts, just start with the firts contract

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.