Forum Discussion
Anonymous
2 years agoNot applicable
Question on filtered measures
Hello all, I'm trying to create a measure that calculates the count filtered by a column with three different criteria. I created measures if I'm filtering by 1 criteria (see below), but need to ...
- Anonymous2 years ago
Nevermind, I was able to validate it. I got the same number with the below measure using the format in the article you shared. Thank you!
OwenAuger
Super User
2 years agoHi Anonymous
From what you've described, this is how I would write the updated measure:
# sales qualified leads modified =
CALCULATE (
DISTINCTCOUNT ( dv_lead_to_opty[lead_id] ),
dv_lead_to_opty[lead_status] = "Qualified",
dv_lead_to_opty[lead_source]
IN { "Marketing Event", "HubSpot - Leadscore", "Hubspot - Talk-to-Sales" }
)
Generally it's best practice to include multiple filters with "and" conditions as separate arguments within CALCULATE.
See this article for some examples/discussion:
https://www.sqlbi.com/articles/specifying-multiple-filter-conditions-in-calculate/
Does something like the above measure give the expected result?
Regards