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
LostnFound
New Member

Count and Filtering TRUE and FALSE

Hello, I'm new to Power BI and I have a single table that shows products with their status in a number of columns as either TRUE or FALSE. I'm looking to count the number of products that are under Inspection, but not under Repair.  All products being repaired are by default also under inspection, but products that have been repaired but are waiting to be inpsected are what I am looking to count. In the table below I should get a result of 1. 

 

LostnFound_0-1653646465917.png

I've tried the following, but I'm getting a result of 12 - which is the number of repairs:

#Inpection = COUNTAX(FILTER(Stock_Daybook,Stock_Daybook[UnderRepair]=FALSE()),Stock_Daybook[UnderInspection]=TRUE())
 
Thanks for your help
1 ACCEPTED SOLUTION
Anonymous
Not applicable

hi @LostnFound 

 

Try this measure

#Inpection =
CALCULATE (
COUNTROWS ( 'Stock_Daybook' ),
AND (
Stock_Daybook[UnderRepair]
= FALSE (),
Stock_Daybook[UnderInspection]
= TRUE ()
)
)
 
If this post helps, Accept it as a solution.

View solution in original post

2 REPLIES 2
LostnFound
New Member

Thank you very much, this worked.

Anonymous
Not applicable

hi @LostnFound 

 

Try this measure

#Inpection =
CALCULATE (
COUNTROWS ( 'Stock_Daybook' ),
AND (
Stock_Daybook[UnderRepair]
= FALSE (),
Stock_Daybook[UnderInspection]
= TRUE ()
)
)
 
If this post helps, Accept it as a solution.

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.