The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 | |
ClientID | HouseholdMembers |
1 | 1 |
1 | 2 |
1 | 3 |
2 | 1 |
2 | 1 |
2 | 1 |
3 | 1 |
3 | 2 |
Expected Results | |
Unique Clients | Household members of Unique Clients |
3 | 6 |
Solved! Go to Solution.
Try these measures:
Unique Clients = DISTINCTCOUNT ( Table1[ClientID] )
Household Members of Unique Clients =
SUMX (
VALUES ( Table1[ClientID] ),
CALCULATE ( MAX ( Table1[HouseholdMembers] ) )
)
Proud to be a Super User!
Try these measures:
Unique Clients = DISTINCTCOUNT ( Table1[ClientID] )
Household Members of Unique Clients =
SUMX (
VALUES ( Table1[ClientID] ),
CALCULATE ( MAX ( Table1[HouseholdMembers] ) )
)
Proud to be a Super User!
Thank you very much !!
User | Count |
---|---|
87 | |
84 | |
36 | |
35 | |
32 |
User | Count |
---|---|
95 | |
75 | |
67 | |
53 | |
52 |