Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have an AD group table:
| AD group | Name | Emp |
| Xyz | Mary | 1 |
| Xyz | Paul | 2 |
| Service | Paul | 2 |
| IT3 | Paul | 2 |
| IT3 | Tim | 3 |
| IT3 | Juana | 4 |
| IT3 | Karla | 5 |
| IT3 | Tatiana | 6 |
and a Employee table:
| Emp | Name | Department |
| 1 | Mary | R |
| 2 | Paul | R |
| 3 | Tim | E |
| 4 | Juana | E |
| 5 | Karla | E |
| 6 | Tatiana | T |
I am trying to display for each AD group, people from how many deparments they have, as:
| AD group | NumberOf Dept |
| Xyz | 1 |
| Service | 1 |
| IT3 | 3 |
It works fine, I am using
Solved! Go to Solution.
Hi, @Anonymous
According to your description, you want to see BLANK in the departments. Right?
Here are the steps you can refer to :
(1)This is my test data which is the same as yours:
We need to create a relationship between two tables:
(2)We can create a calculated column in Multi-terminal tables:
de_name = RELATED('Sheet1'[Department])
(3)We can create a measure :
Count = IF(ISINSCOPE('Sheet1'[Department]),BLANK(), SUMX( DISTINCT('Sheet2'[de_name]),1))
(4)Then we put the measure in the visual and the field we need like this and we will meet your need:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
ISINSCOPE doesnt seem to work for me...
It works at first here:
But, when I drag GroupName, it stops working!
Why is it displaying a 1 for Business? It should be blank!
That looks to be working as expected. If you have the Group Name in the rows then the only time ISINSCOPE would return false would be in the total row.
Hi, @Anonymous
According to your description, you want to see BLANK in the departments. Right?
Here are the steps you can refer to :
(1)This is my test data which is the same as yours:
We need to create a relationship between two tables:
(2)We can create a calculated column in Multi-terminal tables:
de_name = RELATED('Sheet1'[Department])
(3)We can create a measure :
Count = IF(ISINSCOPE('Sheet1'[Department]),BLANK(), SUMX( DISTINCT('Sheet2'[de_name]),1))
(4)Then we put the measure in the visual and the field we need like this and we will meet your need:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi,
use:
IF(NOT(ISINSCOPE(Employee[Department]), ...)
because in a matrix, everything thats visible ABOVE your desired blank is also "in scope".
BR
doesnt seem to work either
did you put Employee[Department] on the Matrix or another field of Employee?
I just tried it and it works on my side...
NumberofBU =
IF (
NOT(ISINSCOPE(Employee[Depeartment])),
SUMX(DISTINCT(Employee[Business]),1),
BLANK()
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.