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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Tine82
Regular Visitor

Formula to calculate compliance (Customers reached target / all customers)

Hi PBI Experts, 

we need please you help, to calculate below formular in PBI.

Thanks 🙂 Chrsitine

Formula for PBI needed.png

1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

To calculate compliance in Power BI based on the formula you provided (Customers reached target / all customers), you can follow these steps:

  1. Load your data: Import your dataset into Power BI that includes information about customers and whether they reached the target or not.

  2. Create measures:

    • Measure 1: Calculate the count of customers who reached the target.
    • Measure 2: Calculate the count of all customers.
    • Measure 3: Calculate compliance using the formula you provided.

Here's how you can create these measures in Power BI:

  • Measure 1: Customers Reached Target

 

CustomersReachedTarget = COUNTROWS(FILTER('YourTable', 'YourTable'[ReachedTarget] = "Yes"))

 

Measure 2: All Customers

 

AllCustomers = COUNTROWS('YourTable')

 

Measure 3: Compliance

 

Compliance = DIVIDE([CustomersReachedTarget], [AllCustomers], 0)

 

  1. Visualize Compliance: Use a card or any visualization where you want to display the compliance rate. Drag the "Compliance" measure into the values section of your visualization.

Ensure to replace 'YourTable' with the name of your table and 'ReachedTarget' with the column that indicates whether a customer reached the target or not.

By following these steps, you'll be able to calculate and visualize compliance in Power BI based on your provided formula.

 
 
 
 

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

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

View solution in original post

2 REPLIES 2
Tine82
Regular Visitor

Thank you very much, for the quick and detailed explanation . It works 🙂

123abc
Community Champion
Community Champion

To calculate compliance in Power BI based on the formula you provided (Customers reached target / all customers), you can follow these steps:

  1. Load your data: Import your dataset into Power BI that includes information about customers and whether they reached the target or not.

  2. Create measures:

    • Measure 1: Calculate the count of customers who reached the target.
    • Measure 2: Calculate the count of all customers.
    • Measure 3: Calculate compliance using the formula you provided.

Here's how you can create these measures in Power BI:

  • Measure 1: Customers Reached Target

 

CustomersReachedTarget = COUNTROWS(FILTER('YourTable', 'YourTable'[ReachedTarget] = "Yes"))

 

Measure 2: All Customers

 

AllCustomers = COUNTROWS('YourTable')

 

Measure 3: Compliance

 

Compliance = DIVIDE([CustomersReachedTarget], [AllCustomers], 0)

 

  1. Visualize Compliance: Use a card or any visualization where you want to display the compliance rate. Drag the "Compliance" measure into the values section of your visualization.

Ensure to replace 'YourTable' with the name of your table and 'ReachedTarget' with the column that indicates whether a customer reached the target or not.

By following these steps, you'll be able to calculate and visualize compliance in Power BI based on your provided formula.

 
 
 
 

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

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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