cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mindstine
Helper I
Helper I

Countif with Multiple Conditions

Hi, Consider a table 

 

DateIDType
21/09/2022AS
21/09/2022AB
21/09/2022BS
21/09/2022CS

 

Need a measure to calculate the distinct count of ID if there is only Type = S date wise

3 REPLIES 3
Mindstine
Helper I
Helper I

It counts other IDs as well. I need only the Distinct Count of those IDs containing Type = "S" only not other than "S"

JorgePinho
Solution Sage
Solution Sage

Try this:

Count = CALCULATE(DISTINCTCOUNT(Table[ID]), Table[Type] = "S")  

 

Then put it in a table together with the date field to see by date.

For Example:
If the ID has 2 entries containing Type "S" & "B" then it should be excluded from the required distinct count
If the ID has 2 Entries containing Type "S" & "S" then it should be counted 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors