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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jwessel
Helper II
Helper II

Distinct Counting while finding max value of another field and summing them.

Hello,

I have a table resembling the below.  Being rather new to PowerBI, I am attempting to figure out the viz I am looking for.

The requirement of the vis is that it has one column identifying the number of unique clientID (count distinct, pretty easy). But, in addition to that I want to sum up the number of household members for each unique ID where the value to sum on would be the maximum # of household members for each unique client. ID.  Not sure how to do this and would appreciate any input.  Max household members for each ClientID is of red color.

Table
ClientIDHouseholdMembers
11
12
13
21
21
21
31
32

 

Expected Results
Unique ClientsHousehold members of Unique Clients
36
1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@jwessel,

 

Try these measures:

 

Unique Clients = DISTINCTCOUNT ( Table1[ClientID] )
Household Members of Unique Clients = 
SUMX (
    VALUES ( Table1[ClientID] ),
    CALCULATE ( MAX ( Table1[HouseholdMembers] ) )
)

 

DataInsights_0-1648665954495.png

 





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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@jwessel,

 

Try these measures:

 

Unique Clients = DISTINCTCOUNT ( Table1[ClientID] )
Household Members of Unique Clients = 
SUMX (
    VALUES ( Table1[ClientID] ),
    CALCULATE ( MAX ( Table1[HouseholdMembers] ) )
)

 

DataInsights_0-1648665954495.png

 





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

Proud to be a Super User!




Thank you very much !!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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