Forum Discussion
Countif with multiple criteria
- 8 years ago
HI RezaAzimi
Go to Modelling Tab and press the NEW TABLE button and enter this formula
You will get a list of all 5854 products that meet these criterion
NEW TABLE = FILTER ( SUMMARIZE ( FILTER ( PumpComponents, PumpComponents[Module] = "X1" || PumpComponents[Module] = "X2" || PumpComponents[Module] = "X3" ), PumpComponents[Product_PN], "Distinct_Count", DISTINCTCOUNT ( PumpComponents[Module] ) ), [Distinct_Count] = 3 )
Hi RezaAzimi
How would you like the final output to be??
Simple Product Numbers that meet the criteria or something else?
Based on your measure I got 5848 product numbers - that means I have 5848 product numbers mapped to all three modules (i.e. x1,x2,x3). Now it is interesting for me to know the details about these 5848 product numbers and not only the count itself. So what I want is so to know is the product id for each of the 5848 as well as the component ID. This means my final result will look like this:
product_ID Component_ID
989879 x1
989879 x2
989879 x3
9989799 x1
9989799 x2
9989799 x3
Put simply, I want to which products did the measure counted.
- Zubair_Muhammad8 years agoCommunity Champion
HI RezaAzimi
Go to Modelling Tab and press the NEW TABLE button and enter this formula
You will get a list of all 5854 products that meet these criterion
NEW TABLE = FILTER ( SUMMARIZE ( FILTER ( PumpComponents, PumpComponents[Module] = "X1" || PumpComponents[Module] = "X2" || PumpComponents[Module] = "X3" ), PumpComponents[Product_PN], "Distinct_Count", DISTINCTCOUNT ( PumpComponents[Module] ) ), [Distinct_Count] = 3 ) - Zubair_Muhammad8 years agoCommunity Champion
Hi RezaAzimi
Why not a simple table of 5858 Products that meet these criterion?
Product_ID
989879
9989799---
----
Component ID is redundant because we already know they have all 3 X components
- RezaAzimi8 years agoAdvocate I
but right now the measure only counts the number so I tried to do a "filter" on the existing dataset but no result is showing up.
so the simple table you talk about it - needs to come from the existing dataset?
- RezaAzimi8 years agoAdvocate I
thank you for the help. it was really helpful:)