Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ukare1996
Helper I
Helper I

CALCULATE FILTER Not working

Hi, can someone please help me understand why my query is not working as it should be? I am trying to Count number of rows where the field is not equal to "None" and Blanks are not counted in. The query below seems to only take into account one of the filters. What am I doing wrong please?
 
Monitor 1 - Action taken by customer =
    CALCULATE(
        COUNT('Network protection '[Monitor 1 - Action taken by customer]),
            FILTER('Network protection ', OR('Network protection'[Monitor 1 - Action taken by customer] <> "None", NOT(ISBLANK('Network protection' [Monitor 1 - Action taken by customer])))))
1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @ukare1996 

try like:

Measure = 
COUNTROWS (
    FILTER (
        'Network protection',
        'Network protection'[Monitor 1]<>"None"
            && 'Network protection'[Monitor 1] <> BLANK() 
    )
)

 

verified with a simplified dataset:

FreemanZ_0-1676601461207.png

 

it worked like:

FreemanZ_1-1676601489540.png

 

if you prefer CALCULATE, try like:

Monitor 1 - Action taken by customer = 
CALCULATE(
    COUNT('Network protection'[Monitor 1]),
    FILTER(
        'Network protection', 
        AND(
            'Network protection'[Monitor 1] <> "None", 
            'Network protection' [Monitor 1] <>BLANK()
        )
    )
)

FreemanZ_2-1676601690667.png

 

View solution in original post

5 REPLIES 5
FreemanZ
Super User
Super User

hi @ukare1996 

try like:

Measure = 
COUNTROWS (
    FILTER (
        'Network protection',
        'Network protection'[Monitor 1]<>"None"
            && 'Network protection'[Monitor 1] <> BLANK() 
    )
)

 

verified with a simplified dataset:

FreemanZ_0-1676601461207.png

 

it worked like:

FreemanZ_1-1676601489540.png

 

if you prefer CALCULATE, try like:

Monitor 1 - Action taken by customer = 
CALCULATE(
    COUNT('Network protection'[Monitor 1]),
    FILTER(
        'Network protection', 
        AND(
            'Network protection'[Monitor 1] <> "None", 
            'Network protection' [Monitor 1] <>BLANK()
        )
    )
)

FreemanZ_2-1676601690667.png

 

This worked - thank you so much 🙂

tamerj1
Super User
Super User

Hi @ukare1996 

please try

Monitor 1 - Action taken by customer =
COUNTROWS (
FILTER (
VALUES ( 'Network protection '[Monitor 1 - Action taken by customer] ),
NOT (
'Network protection'[Monitor 1 - Action taken by customer]
IN { "None", BLANK () }
)
)
)

Hi,

That didnt work sorry. Below is a mock up example of what I need.

The ideal result I am expecting from here is 2 - with blanks and none excluded.

ukare1996_0-1676560132444.png

 

@ukare1996 

please try

Monitor 1 - Action taken by customer =
COUNTROWS (
FILTER (
 'Network protection ',
NOT (
'Network protection'[Monitor 1]
IN { "None", BLANK () }
)
)
)

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.