Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello, I would like my matrix columns to be split based on if Employee is selected ("Yes") or not selected ("No").
I have my Base Table
| Product | Employee | Units |
| Apple | A | 1 |
| Pear | A | 2 |
| Apple | B | 3 |
| Pear | B | 4 |
| Apple | C | 5 |
| Pear | C | 6 |
and Selection Table
| Employee |
| A |
| B |
| C |
Here is an example of the desired outcome if I select "A" from the selection table
| Product | In Selection | Out of Selection |
| Apple | 1 | 8 |
| Pear | 2 | 10 |
I am new to Power BI and DAX, my experience in mostly in Tableau. If there is a solution that doesn't require the Selection Table, that is good too.
Thanks!
Solved! Go to Solution.
Hi! You're going to want to create two different measures that use the SELECTEDVALUE function, one for the total for employee selected and the other for all employees except the selected one.
Probably not syntactically perfect, but this should be close...
VAR
SelectedEmployee = SELECTEDVALUE(Employee[Employee])
RETURN
CALCULATE(
SUM(BaseTable[Units])
Employee[Employee] = SelectedEmployee
)
VAR
SelectedEmployee = SELECTEDVALUE(Employee[Employee])
RETURN
CALCULATE(
SUM(BaseTable[Units])
Employee[Employee] <> SelectedEmployee
)Hi! You're going to want to create two different measures that use the SELECTEDVALUE function, one for the total for employee selected and the other for all employees except the selected one.
Probably not syntactically perfect, but this should be close...
VAR
SelectedEmployee = SELECTEDVALUE(Employee[Employee])
RETURN
CALCULATE(
SUM(BaseTable[Units])
Employee[Employee] = SelectedEmployee
)
VAR
SelectedEmployee = SELECTEDVALUE(Employee[Employee])
RETURN
CALCULATE(
SUM(BaseTable[Units])
Employee[Employee] <> SelectedEmployee
)Thank you. This solution works. I don't like that Power BI doesn't have a dynamic "set/group" solution because that would only be one variable, rather than one for each measure. But since it looks like they don't have this option, this is a good solution. Thanks!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 51 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 38 | |
| 29 | |
| 27 |