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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.