Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi, I am trying to filter users that are as "Status" only Concluded, but are not Active.
For example :
Paolo Pio was in a class Concluded but is also in a class Active so I should exclude it.
Carlo Tol Concluded two classes but is also Active in one class so I should exclude it.
Mich Rovati was in a class concluded so it is ok for the result table
Gianni Cosati is in a class Active so it should be excluded
Correct Results
Do you know how to do it in Power Bi?
Thank you very much.
Solved! Go to Solution.
Hi @Dark_Bi
Use this measure to filter your visuals:
Measure =
Var _Status = filter(addcolumns(all('Table 1'),"ST",RELATED('Table 2'[Status])),[ST]="Active")
Var _A = SUMMARIZE(_Status,[Last name])
return
if(MAX('Table 1'[Last name]) in _A,1,0)
Output:
Download the attached file.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Is it ok?
Table 1 | ||||||
User id | Name | Last name | Class ID | |||
1 | Paolo | Pio | 2 | |||
1 | Paolo | Pio | 6 | |||
2 | Mario | Meol | 7 | |||
3 | Carlo | Tol | 5 | |||
3 | Carlo | Tol | 7 | |||
3 | Carlo | Tol | 8 | |||
4 | Mich | Rovati | 6 | |||
5 | Gianni | Cosati | 9 |
Table 2 | |
Class ID | Status |
2 | Active |
3 | Concluded |
4 | Concluded |
5 | Active |
6 | Concluded |
7 | Concluded |
8 | Concluded |
9 | Active |
Is it ok?
Table 1 | ||||||
User id | Name | Last name | Class ID | |||
1 | Paolo | Pio | 2 | |||
1 | Paolo | Pio | 6 | |||
2 | Mario | Meol | 7 | |||
3 | Carlo | Tol | 5 | |||
3 | Carlo | Tol | 7 | |||
3 | Carlo | Tol | 8 | |||
4 | Mich | Rovati | 6 | |||
5 | Gianni | Cosati | 9 |
Table 2 | |
Class ID | Status |
2 | Active |
3 | Concluded |
4 | Concluded |
5 | Active |
6 | Concluded |
7 | Concluded |
8 | Concluded |
9 | Active |
Hi @Dark_Bi
Use this measure to filter your visuals:
Measure =
Var _Status = filter(addcolumns(all('Table 1'),"ST",RELATED('Table 2'[Status])),[ST]="Active")
Var _A = SUMMARIZE(_Status,[Last name])
return
if(MAX('Table 1'[Last name]) in _A,1,0)
Output:
Download the attached file.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Great Solution!! Thank you very much!
User | Count |
---|---|
117 | |
75 | |
62 | |
50 | |
44 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |