Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have some data structured as below - rows are individuals; each individual can belong to one or more of teams A through D, and each invidual has a certain number of clients. I'd like to create a slicer that selects a team. Let's say I have a card which computed the average number of clients.
PERSONID | N_CLIENTS | TEAM_A | TEAM_B | TEAM_C | TEAM_D |
1 | 6 | TRUE | TRUE | FALSE | FALSE |
2 | 12 | FALSE | TRUE | FALSE | FALSE |
3 | 4 | FALSE | FALSE | FALSE | TRUE |
4 | 9 | TRUE | FALSE | TRUE | FALSE |
5 | 4 | FALSE | TRUE | FALSE | TRUE |
6 | 1 | TRUE | FALSE | FALSE | FALSE |
7 | 20 | TRUE | FALSE | FALSE | FALSE |
8 | 14 | FALSE | TRUE | FALSE | TRUE |
The googling I have done suggests that I unpivot the team rows. But if I do that, I end up with each individual being listed more than once on the table and so my card is incorrect when no selection is made on the slicer.
So, what I'm looking for is either a way to do this filter with the data in "wide" format OR a way for my card to only consider one row per individual with the data in "long" format.
Solved! Go to Solution.
@Anonymous , Try a measure like
AverageX(Summarize(Table, Table[PERSONID], [NCLIENT]), [NCLIENT])
@Anonymous , Unpivot and remove FALSE rows(Power query filter TRUE) , I can see most of the row has one true that will remove duplicate and you do not filter = True
I've done that, but the trouble is Person 1 belongs to two teams. So, if I am generating an "overall" average number of clients (i.e., without selecting a team on the slicer) that person gets counted twice in the computation of the average.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |