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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
TJCappy
Frequent Visitor

Sum with multiple filters for different columns in the same table

Ihave two tables,
1 is employeedirectory and has thr following columns:
employeename
EmployeeID
department
Title


2 is XFX Genesys Agent queue and has the following columns:
Interaction type,
Queuename,
Accepted,
Agent name,
Handle time,
AgentID.


the two tables are connected by columns EmployeeID and AgentID
I need to create a measure that will give me the number of calls each agent has accepted "inbound" from each of the queues 

the  Accepted column is a number that represents the total number of calls accepted within the period of an hour.

I have tried the following but nothing seems to give me the result I need 


a)
Calls Accepted by Agent = CALCULATE( SUMX( FILTER( 'xFX Genesys Agent Queue', 'XFX Genesys Agent Queue'[Interaction type] = "Inbound" && 'XFX Genesys Agent Queue'[Accepted] > 0 ), 'XFX Genesys Agent Queue'[Accepted] ) )

b)
Calls Accepted by Agent = CALCULATE( COUNTROWS('XFX Genesys Agent Queue'), FILTER( X'FX Genesys Agent Queue', 'FX Genesys Agent Queue'[Interaction type] = "Inbound" && 'XFX Genesys Agent Queue'[Accepted] > 0 ) )

I have also tried various combinations of summarize and summarizecolumn 

 

All to no avail

 

can someone please help me out.  Thanks

 

1 ACCEPTED SOLUTION
v-yohua-msft
Community Support
Community Support

Hi, @TJCappy 

Based on your information, I created two sample tables:

vyohuamsft_0-1715325504277.png

 

Then create a new measure and try the following dax expression:

 

Calls Accepted by Agent = 
SUMX(
    FILTER(
        'XFX Genesys Agent Queue', 
        'XFX Genesys Agent Queue'[InteractionType] = "Inbound" && 
        'XFX Genesys Agent Queue'[Accepted] > 0
    ), 
    'XFX Genesys Agent Queue'[Accepted]
)

 

vyohuamsft_1-1715325788984.png

 

You can create another slicer and put the Queuename in it to filter the number of times different Queuenames are used.

Here is my preview:

vyohuamsft_2-1715325813102.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

View solution in original post

1 REPLY 1
v-yohua-msft
Community Support
Community Support

Hi, @TJCappy 

Based on your information, I created two sample tables:

vyohuamsft_0-1715325504277.png

 

Then create a new measure and try the following dax expression:

 

Calls Accepted by Agent = 
SUMX(
    FILTER(
        'XFX Genesys Agent Queue', 
        'XFX Genesys Agent Queue'[InteractionType] = "Inbound" && 
        'XFX Genesys Agent Queue'[Accepted] > 0
    ), 
    'XFX Genesys Agent Queue'[Accepted]
)

 

vyohuamsft_1-1715325788984.png

 

You can create another slicer and put the Queuename in it to filter the number of times different Queuenames are used.

Here is my preview:

vyohuamsft_2-1715325813102.png

 

How to Get Your Question Answered Quickly 

Best Regards

Yongkang Hua

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors