Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have read the documentation on the calculate function but I am still not quite sure how the filter actually works, for example does what you put as a filter exclude everything else or only include what is in the filter?
For example if I want to count the total number of completed events in a particular category, but I want to exclude/filter out one specific event is this the correct way?
Solved! Go to Solution.
Hi @PowerAutomater
When using the Calculate function and you use Filter for example as in the above case it includes only the cases where Category is "Great Events" and Event Name is "Not Great Event"
If your goal is to exclude "Not Great Event" within the "Great Events" category, you should use:
CALCULATE(
COUNT(Query1[Completed]),
Query1[Category] = "Great Events",
Query1[Event Name] <> "Not Great Event"
)
Each filter in CALCULATE includes the matching rows, you would have to specify if equal to or not equal to.
To exclude, use the <> (not equal) operator
Using "," has the same effect as the AND operator (&&), for OR (||), you would have to specify this.
If Resolved, Mark as Solution to guide others!
Hi @PowerAutomater
When using the Calculate function and you use Filter for example as in the above case it includes only the cases where Category is "Great Events" and Event Name is "Not Great Event"
If your goal is to exclude "Not Great Event" within the "Great Events" category, you should use:
CALCULATE(
COUNT(Query1[Completed]),
Query1[Category] = "Great Events",
Query1[Event Name] <> "Not Great Event"
)
Each filter in CALCULATE includes the matching rows, you would have to specify if equal to or not equal to.
To exclude, use the <> (not equal) operator
Using "," has the same effect as the AND operator (&&), for OR (||), you would have to specify this.
If Resolved, Mark as Solution to guide others!
Thank you for that, I haven't come across <> before. Is this any different to adding a NOT in this way?
CALCULATE(COUNT(Query1[Completed]),Query1[Category] = "Great Events", NOT(Query1[Event Name] = "Not Great Event"))
Both these would give you the same result, it is just a couple of different ways to achieve the same.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |