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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.