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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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_
Super User
Super User

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?)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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_
Super User
Super User

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?)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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