Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I have this table
Client | Contract | YES/NO |
1 | a | YES |
1 | b | NO |
1 | c | NO |
2 | d | NO |
2 | e | NO |
3 | f | YES |
3 | g | YES |
3 | h | NO |
4 | i | NO |
4 | j | NO |
How can I COUNT the CLIENTS without YES ? In the example, my count would be = 2 (Client 2 and 4 doenst have any YES)
Thanks!
Solved! Go to Solution.
See if this works:
Measure =
CONCATENATEX(
EXCEPT(
DISTINCT('Table'[Client]),
DISTINCT(SELECTCOLUMNS(FILTER('Table',[YES/NO]="YES"),"Client",[Client]))
),
[Client],
","
)
@Anonymous
To count clients without a "YES":
All Clients = Distinctcount (table [Client])
Clients with "Yes" = CALCULATE(DISTINCTCOUNT(Table [Client]),
FILTER( Table,
Table [YES/NO] = "YES"))
Clients Without "Yes" = [All Clients] - [Clients with "Yes"]
Proud to be a Super User!
Paul on Linkedin.
@Anonymous
To count clients without a "YES":
All Clients = Distinctcount (table [Client])
Clients with "Yes" = CALCULATE(DISTINCTCOUNT(Table [Client]),
FILTER( Table,
Table [YES/NO] = "YES"))
Clients Without "Yes" = [All Clients] - [Clients with "Yes"]
Proud to be a Super User!
Paul on Linkedin.
@Anonymous
Hi,
according to your data 1a <> 1b, right?
Is the following pict the logic you are looking for?
See if this works:
Measure =
CONCATENATEX(
EXCEPT(
DISTINCT('Table'[Client]),
DISTINCT(SELECTCOLUMNS(FILTER('Table',[YES/NO]="YES"),"Client",[Client]))
),
[Client],
","
)
Hi , Thanks for your reply.
I wanted to count the Clients but your measure was useful to fix my problem.
Regards,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
78 | |
68 | |
55 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |