The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 |
---|---|
69 | |
69 | |
66 | |
54 | |
28 |
User | Count |
---|---|
112 | |
82 | |
66 | |
48 | |
43 |