cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

## percentage de penetration

Hello, I have a database of more than 5 million lines with billing information, each line with the customer code that you bought, that is, you can have 1 line for one customer while another customer can have 10 lines. I want to calculate the percentage of penetration of a product in a certain period, the percentage of penetration is calculated: how many customers bought me at least 1 product "x" among the total number of customers who bought in that period, that is, in January, they sold me 100 clients but only 10 customers bought at least one fragrance, my fragrance penetration is 10%. thank you very much

1 ACCEPTED SOLUTION
Microsoft Employee

Hi @keylorbb,

Based on below sample data, please create a calculated column.

```percentage of penetration per product =
DIVIDE (
CALCULATE (
DISTINCTCOUNT ( 'Test Data'[Customer] ),
ALLEXCEPT (
'Test Data',
'Test Data'[Date].[Year],
'Test Data'[Date].[MonthNo],
'Test Data'[Product]
)
),
CALCULATE (
DISTINCTCOUNT ( 'Test Data'[Customer] ),
ALLEXCEPT ( 'Test Data', 'Test Data'[Date].[Year], 'Test Data'[Date].[MonthNo] )
)
)
```

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Microsoft Employee

Hi @keylorbb,

Please post thread in English so that community members can better understand your requirement. Besides, please post sample data and show us your desired output so that I can try to reproduce the same scenario on my side.

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
New Member

Hello, thank you very much for you answer. I made the correction requested, can you help me?

Microsoft Employee

Hi @keylorbb,

Based on below sample data, please create a calculated column.

```percentage of penetration per product =
DIVIDE (
CALCULATE (
DISTINCTCOUNT ( 'Test Data'[Customer] ),
ALLEXCEPT (
'Test Data',
'Test Data'[Date].[Year],
'Test Data'[Date].[MonthNo],
'Test Data'[Product]
)
),
CALCULATE (
DISTINCTCOUNT ( 'Test Data'[Customer] ),
ALLEXCEPT ( 'Test Data', 'Test Data'[Date].[Year], 'Test Data'[Date].[MonthNo] )
)
)
```

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors