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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mshakir164
Frequent Visitor

Distinct Count of Parent Items from multiple child

I have a table named Customer with the columns Customerkey, ParentCustomer, and second table named FactCustomer with these columns Customerkey, Month, Status, and Confidence the relationship between these two is one to many on Customerkey I want to get a distinct count of ParentCustomer from Customer table where Status in FactCustomer table is close and confidence is max.

Note: There are multiple records in FactCustomer under the same ParentCustomer as Close in the Status column and with different values in the Confidence column

6 REPLIES 6
lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

@lbendlin 

mshakir164_0-1694591521258.png


I have a slicer of ParentCustomer, currently if I select A from ParentCustomer slicer then it shows me three rows in my required output table/grid and total as 1 I want only one row (the Red one) in the required output table/grid because from CustomerID 2,3, and 4 which are close and under same ParentCustomer I need only one where confidence is 96.

Hi,

Share the 2 tables in a format that can be pasted in an MS Excel file.


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

Customer FactCustomer
CustomerIDParentCustomer CustomerIDStatusMonthConfidenceZone

1

A 

1

Active

2023010178 
2A 2Close2023010196Red
3A 3Close2023010185Yellow
4A 4Close2023010171Green
5B 5Active2023010174 
6B 6Close2023010154Green
7B 7Close2023010185Yellow
8D 8Active2023010165 



Required Output
ZoneNo of Closed Parent Customer
Red1
Yellow1
Green 

 

Hi,

If you only want to show the Zone which has the highest number, then only Red should appear.  Why have you shown Yellow and Green in the result?


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

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors