Forum Discussion
LostnFound
4 years agoNew 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.
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
- Anonymous4 years ago
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.
2 Replies
- AnonymousNot 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. - LostnFoundNew Member
Thank you very much, this worked.