Forum Discussion
Countifs Function
- 8 years ago
I was able to get it. The table i created was from the following formula, then i just linked it to my existing table and created a slicer on the QuoteID and selected all except blank. Thank you for your help!
=DISTINCT(FILTER(table,table[CompanyID]=1))
Measure = CALCULATE(COUNT([QuoteID]),[CompanyID]=1)
smoupre, thank you for your response. Unfortunatly, that is only giving me 1's where the companyID is 1, not the full QuoteID if a company is 1. Basically it is just giving a 1 in the same rows that the company is a 1. I would like it to give a 1 in any row if the company 1 shows up in the QuoteID.
- Omega8 years agoImpactful Individual
Try the below measure:
Measure = IF(CALCULATE(DISTINCTCOUNT(Table1[Quote ID]),Table1[Company ID]=1)=0,0,CALCULATE(DISTINCTCOUNT(Table1[Quote ID]),Table1[Company ID]=1))
- amotto118 years agoHelper II
Thank you for your response, but unfortunatly that was the same result as the previous response, but instead of Blanks it put 0's. Basically it has a 1 where there is a 1 for the company, but 0's everywhere else. I would like to have a 1 be on every row where the QuoteID contains the 1 company. So even though the company on that row isn't a 1, if the QuoteID contains the 1 company, then that row should be a 1.
- Greg_Deckler8 years agoCommunity Champion
I think I understand what you are going for now. I'll take a look at how to do that. One question though is why do you feel this is what you need? I'm not understanding the use case behind it. There may be different solution if I could conceptualize what you are trying to do exactly.