Forum Discussion
abeirne
Helper II
4 years agoHelp with count measure (true/false expression does not specify a column)
Hi all, I am trying a measure that calculates % of valid emails. I have the column filtered in power query and outputs "Not Valid" when email does not meet a certain criteria.
% Valid Emails =
VAR Valid =
CALCULATE(
COUNT(Invoice_Tb[Customer Email (Clean)]),
SELECTEDVALUE(Invoice_Tb[Customer Email (Clean)]) <> "Not Valid"
)
VAR PercentDiv =
DIVIDE(
COUNT(Invoice_Tb[Customer Email (Clean)]),
Valid
)
RETURN
PercentDiv * 100
I keep getting the error "The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column." Not sure what to do. Thanks
I keep getting the error "The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column." Not sure what to do. Thanks
abeirne hey, try this:
% Valid Emails = VAR Valid = CALCULATE( COUNT(Invoice_Tb[Customer Email (Clean)]), Invoice_Tb[Customer Email (Clean)] <> "Not Valid" ) VAR PercentDiv = DIVIDE( COUNT(Invoice_Tb[Customer Email (Clean)]), Valid ) RETURN PercentDiv * 100
In case it answered your question please mark this as a solution for community visibility. Appreciate Your Kudos 🙂
2 Replies
- SpartaBI
Community Champion
abeirne hey, try this:
% Valid Emails = VAR Valid = CALCULATE( COUNT(Invoice_Tb[Customer Email (Clean)]), Invoice_Tb[Customer Email (Clean)] <> "Not Valid" ) VAR PercentDiv = DIVIDE( COUNT(Invoice_Tb[Customer Email (Clean)]), Valid ) RETURN PercentDiv * 100
In case it answered your question please mark this as a solution for community visibility. Appreciate Your Kudos 🙂- abeirne
Helper II
Thanks! My divide was also backwards but the measure is working now 🙂