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
Anonymous
Not applicable

Count Matches in indirectly related table

I'm having trouble with some DAX, and need some help or pointing in the right direction as it's driving me mad...

 

I have 3 tables:

1. A "Master" table, of Customers (unique customer code).

2. A table of Customer phone call Start and End date time (related to 1 via the customer code) a customer may have many calls and which employee answered the call

3. A table of Customer work detail changes (related to 1 via the customer code) with the date time and employee. The details may have many modifications for each customer.

 

Tables 2 and 3 are not joined together directly

 

I have 2 goals:

1. I want to add a column to the work details (table 3) to flag that this change was a result of a customer call (I want this so I can add a slicer on the Power BI report to filter other performance metrics based on whether it happened from a call or not).

2. I want to be able to count how many work detail changes (in table 3) were during a call (in table 2) and by the same employee, and how many were not related to a call or made by someone else

 

What's the best method to achieve these goals? I've tried several different ideas using FlLTER and RELATED, but don't seem to get the results I'm expecting!

 

Any suggestions would be very welcome!

1 REPLY 1
Greg_Deckler
Super User
Super User

Very difficult to say without sample data to play around with. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

That being said, your second item may be some variation on these quick measure I put together for time intervals:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.