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
MDN
Regular Visitor

Display list of contacts based on criteria from another table

Apologies if this question has been asked already, I didn't even know what terminology to use to search for what I want.

 

I have a table of contacts which is related to a leads table. There are several things I want to do.

In a table

1. Display only the contacts which are related to a lead with Subject A

2. List how many leads with Subject A have been related to the contact

3. List how many leads (Subject not important) is connected to the contact

 

If I use a page filter to say show me only contacts with Subject A, this affects point 3.

What would be the best strategy to isolate the contacts which meet this criteria without it affecting the measures I have created.

 

Edited to include data example

 

Contact Table

Contact GUIDContact Name
1234Person A
1235Person B
1236Person C

 

Contact Table is connected one to many to the lead table via the GUID

 

Lead Table

Parent Contact Lead GUIDContact NameTopic
1234Person ASubject A
1234Person ADifferent Topic
1236Person CSubject A
1235Person BTopic 3

 

What I am seeing

Contact NameTotal LeadsSubject A leads
Person A21
Person B1 
Person C11
Total42

 

What I see with a page filter on (filtered on contacts who have a lead with Subject A as the topic)

Contact NameTotal LeadsSubject A leads
Person A11
Person C11
Total22

 

What I want to see

Contact NameTotal LeadsSubject A leads
Person A21
Person C1 
Total21

Thanks

1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


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

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Share some data, describe the question and show the expected result.


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

Hi Ashish, I added some data as per your request. My question is
What would be the best strategy to isolate the contacts which meet the criteria of "leads with topic = Subject A) without it affecting the measures I have created. As I mentioned in my original post, when I use a page filter it affects the display of leads which are not titled "Subject A"

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


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

Great! I see where I went wrong...

 

In my calculations I had Total leads counting all leads and then I had another calculations for Subject A leads which isolated the leads with Subject A which ultimately affected the Total Lead count when I applied my filter. The formula you introduced for "Total leads" was a perfect solution. Thank you.

 

As an FYI for those with the same problem. The two calculations which worked for me were

 

Count leads = Countrows('leads') 
which counts all leads based on the filter applied

 

Total Leads = CALCULATE([Count Leads],All(leads[subject]))
which counts all the leads regardless of the filter

You are welcome.


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

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.