- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 filter by an additional three criteria within the same column. For example, I need to calculate the # of leads if they have a status of "Qualified" AND if their lead source is Marketing Event, HubSpot - Leadscore, or HubSpot - Talk-to-Sales. I'm getting an error when trying to add additional columns. Any help would be greatly appreciated. Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In case this is also helpful, this is what I'm seeing:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, @OwenAuger !
I have multiple measures I need to create and will use the above you provided. However, I'm seeing a discrepancy when validating these measures.
I'm getting 1,376 leads when using the below measure:
I'm using this measure and slicer filter for the column "lead_source" to check the above. I'm getting a discrepancy of 11 contacts. Do you know why this might be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @EmilyJ
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

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
06-10-2024 03:14 AM | |||
09-21-2024 12:45 PM | |||
03-03-2023 08:21 AM | |||
Anonymous
| 09-05-2024 07:54 AM | ||
02-19-2024 08:55 AM |
User | Count |
---|---|
24 | |
15 | |
9 | |
9 | |
8 |
User | Count |
---|---|
19 | |
15 | |
14 | |
13 | |
13 |