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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PBINewbie12
Employee
Employee

Attempting to calculate values in dataset where one of the parameters resides in a separate table

Hello PBI Experts!   Newbie here with a question:

 

I have a dataset that looks something like the following:

 

Requests for Assistance
AgentCustomerDate
DaveABC2/4/2021
SuzyDEF2/5/2021
DaveDEF2/6/2021
JoeABC2/7/2021
BillGHI2/8/2021
SuzyABC2/9/2021
TomDEF2/10/2021
FrankABC2/11/2021
JoleneGHI2/12/2021
MaggieABC2/13/2021
SuzyABC2/14/2021
DaveDEF2/15/2021
KathyDEF2/16/2021

 

I want to be able to calculate the number of times that customer ABC has requested assistance, and the agent that answered the question is one of our specialized agents as determined by the table below

 

Specialized Agents
Agent
Suzy
Frank

 

In this example, the answer would be 3.

 

Many thanks for the help!

1 ACCEPTED SOLUTION
Nathaniel_C
Super User
Super User

Hi @PBINewbie12 ,

Try this.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 

Client ABC calls handdled by Specialized Agent = 

CALCULATE(COUNTROWS(Requests),FILTER(Requests,Requests[Customer]="ABC" && Requests[Agent] IN Values(S_Agent[Agent])))



 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @PBINewbie12 
You can use 

Requests from Speciallized Agents = 
CALCULATE ( 
    COUNTROWS ( Requests ),
    Requests[Agent] IN VALUES ( Agents[Specialized Agents] )
)

1.png

Nathaniel_C
Super User
Super User

Hi @PBINewbie12 ,

Try this.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 

Client ABC calls handdled by Specialized Agent = 

CALCULATE(COUNTROWS(Requests),FILTER(Requests,Requests[Customer]="ABC" && Requests[Agent] IN Values(S_Agent[Agent])))



 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Nathaniel_C_0-1653354425563.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.