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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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.

Anonymous
Not applicable

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.