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.
I have two tables [Account] and [Contact]
They have a one (account) to many (contact) join
The [Contact] table has a [Job Group] column
The [Job Group] is populated with a single value like "CEO" or "CFO" of "CIO"
I am trying to figure out how many [Account] records do not have a "CEO"
I tried using the Quick Measure to come up this this but it gives me a total count of accounts, not just accounts without a CEO
Count of Id for CEO =
CALCULATE(
COUNTA('Account'[Id]),
'Contact'[Job_Group__c] <> { "CEO" }
Solved! Go to Solution.
Hi @OleMcDonald
Count of Id for CEO =
COUNTROWS (
FILTER (
'Account',
CALCULATE ( COUNT ( 'Contact'[Job_Group__c] ), 'Contact'[Job_Group__c] = "CEO" ) = 0
)
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
See if this measure works. You shouldn't use COUNTA() here. The only thing it can do that COUNT cannnot is use boolean comparisons, but I don't think you need that. Just count the rows that meet your critera.
Counting Measure =
COUNTROWS(
FILTER(
TableName,
TableName[Field] <> "CEO"
)
)
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @OleMcDonald
Count of Id for CEO =
COUNTROWS (
FILTER (
'Account',
CALCULATE ( COUNT ( 'Contact'[Job_Group__c] ), 'Contact'[Job_Group__c] = "CEO" ) = 0
)
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |