Formula Generator | DAX
DAX Formula for Calculating Adoption Rate
This guide explains a DAX formula to compute the adoption rate while excluding 'super' product types from the customer count. It details variable definitions, computation methods, and provides a practical example for better understanding.
Prompt
Answer
DAX Formula for Adoption Rate
To calculate the adoption rate with the conditions specified, you can use the following DAX formula:
AdoptionRate =
VAR TotalFNI = SUM(customer_profile_digital_report[FNI_3M])
VAR TotalCustomers =
CALCULATE(
SUM(customer_profile_digital_report[customers]),
customer_profile_digital_report[product_type] <> "super"
)
RETURN
DIVIDE(TotalFNI, TotalCustomers, 0)
Breakdown of the Formula
Variables (
VAR
):TotalFNI
: Computes the total of theFNI_3M
column.TotalCustomers
: Calculates the total number of customers but excludes those where the product type is "super".
COMPUTE TotalCustomers:
- The
CALCULATE
function modifies the filter context to exclude any record where the product type equals "super". This ensures that if the product type is "super", it does not contribute to the customer count.
- The
Using DIVIDE Function:
- The
DIVIDE
function is utilized to safely perform division. It takes three parameters: numerator, denominator, and an optional alternate result (in this case0
if the denominator is0
).
- The
Practical Example
Consider the following dataset in the customer_profile_digital_report
table:
product_type | FNI_3M | customers |
---|---|---|
standard | 100 | 50 |
super | 200 | 0 |
standard | 150 | 75 |
premium | 300 | 30 |
- Calculation:
- Total FNI (
FNI_3M
): 100 + 200 + 150 + 300 = 750 - Excluded Customers (where product_type = "super"): Only one record, which means:
- Total Customers = 50 + 75 + 30 = 155
- Adoption Rate = Total FNI (750) / Total Customers (155) = 4.84 (approximately
4.84
).
- Total FNI (
Conclusion
This DAX formula effectively calculates the adoption rate while adhering to the specific condition regarding the product type. If there are any further conditions or requirements for the analysis, consider leveraging additional DAX functions and statistics available. For comprehensive learning on DAX and its applications, consider the courses available on the Enterprise DNA Platform.
Description
This guide explains a DAX formula to compute the adoption rate while excluding 'super' product types from the customer count. It details variable definitions, computation methods, and provides a practical example for better understanding.