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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
njxfoster
Helper I
Helper I

How can I add one more filter condition for this measure?

Hi Guys 

 

I am using this measure to count every rows contained "I", and if there are no "I", I want to count it as 0 instead of blank 

 

IT = IF (
    NOT ISBLANK ( COUNTROWS ( 'Roster' ) ),
    IF (
        ISBLANK ( COUNTROWS ( FILTER ( 'Roster', 'Roster'[Completion_Status] = "I" ) ) ),
        0,
        COUNTROWS ( FILTER ( 'Roster', 'Roster'[Completion_Status] = "I" ) )
    )
)
 
 
Now I need to count the row with "IT" as well, What should the measure be?
 
 
Thanks in advance!
 
 
 
 
1 ACCEPTED SOLUTION
Wilson_
Solution Sage
Solution Sage

Hello njxfoster,

 

If I've understood your question correctly, try replacing "FILTER ( 'Roster', 'Roster'[Completion_Status] = "I" )" with "FILTER ( 'Roster', 'Roster'[Completion_Status] IN { "I", "IT" } )".


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @njxfoster 

how does your visual look like? What columns are placed in the visual? How does your data model look like?

Wilson_
Solution Sage
Solution Sage

Hello njxfoster,

 

If I've understood your question correctly, try replacing "FILTER ( 'Roster', 'Roster'[Completion_Status] = "I" )" with "FILTER ( 'Roster', 'Roster'[Completion_Status] IN { "I", "IT" } )".


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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