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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
vivran22
Community Champion
Community Champion

% population meeting target

Hello folks,

 

I have a scenario where I need help.

 

Objective is to calulate % population meeting the target, by:

  • Supervisor
  • Month

 

I have two data tables: AHT Performance & Target

 

The formula would be simple: (Count of agents meeting target/ Total agents in the team or month)

 

I am enclosing the sample pbix file for your reference. % population meeting target.pbix

 

Any help/guidance will be highly appreciated.

 

Thanks,

Vivek

1 ACCEPTED SOLUTION

Figured out the solution:

 

Measure 1:

 

Population Count = COUNTROWS(dtTable)

 

Measure 2:

 

Meeting AHT Target = 
CALCULATE (
    [Population Count],
    FILTER ( dtTable, [Avg Handle Time] <= RELATED ( dtTarget[AHT tgt] ) )
)

 

Measure 3:

 

% Population Meeting Target = DIVIDE([Meeting AHT Target],[Population Count])

 

Enclosing the sample pbix file here

 

Vivek

View solution in original post

6 REPLIES 6
vivran22
Community Champion
Community Champion

@Ashish_Mathur 

 

Can you please help me with this?

 

Thanks,

Vivek

Hi,

I cannot visualise your expected result.  Explain the business question and show the result clearly in a Table format with an explanation of how you arrived at the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur 

 

Hello,

 

Thank you for your response.

 

Below are two sample tables for the expected results:

 

Table 1.png

 

Table 2.png

 

Hope this explains the requirement.

 

Thanks,

Vivek

 

 

Figured out the solution:

 

Measure 1:

 

Population Count = COUNTROWS(dtTable)

 

Measure 2:

 

Meeting AHT Target = 
CALCULATE (
    [Population Count],
    FILTER ( dtTable, [Avg Handle Time] <= RELATED ( dtTarget[AHT tgt] ) )
)

 

Measure 3:

 

% Population Meeting Target = DIVIDE([Meeting AHT Target],[Population Count])

 

Enclosing the sample pbix file here

 

Vivek

Hi,

How did you compute the figures of 41, 38 45 etc.  Please be descriptive/clear.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @vivran22 ,

 

You could move the target to the main table with USERELATIONSHIP() function like the following DAX:

Talk tgt =
CALCULATE (
    SELECTEDVALUE ( dtTarget[Talk tgt] ),
    USERELATIONSHIP ( dtTarget[Product], dtTable[Product] )
)

 Then you could use COUNTROWS() to get values.

 

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.