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
joshcomputer1
Helper V
Helper V

Countif based off of unique entries

I have a set of audits. Each one has a total score-  summary[total score].  I want to be able to count the number of scores that were above 90%. The only trick to this is that the data is unpivoted so I need to filter based on the only unique identifier which is the summary[ticket number].  I think I need this:

 

count of scores above 90% if the ticket number is unique. 

 

This formula gets me a count but because the total score column is duplicated, it is much higher than actual (almost 10x higher)

Goal of 90 = calculate(count(summary[total score]), summary[total score] >= .9)

 

1 ACCEPTED SOLUTION

Hi @joshcomputer1

 

Try this measure

 

Goal of 90 =
CALCULATE (
    COUNTROWS (
        SUMMARIZE ( Summary, Summary[Ticket Number], Summary[Total Score] )
    ),
    Summary[Total Score] >= .9
)

Regards
Zubair

Please try my custom visuals

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi @joshcomputer1,

 

Try this

 

=CALCULATE(DISTINCTCOUNT(summary[total score]),summary[total score] >= .9)

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
nickchobotar
Skilled Sharer
Skilled Sharer

@joshcomputer1

 

Give this a try

 

=
CALCULATE (
    COUNT ( summary[total score] ),
    ALLEXCEPT ( summary, summary[Ticket Number] ),
    summary[total score] >= .9
)

Does not work. The number went up. It needs to be filtered by unique ticket number. 

Hi @joshcomputer1

 

Try this measure

 

Goal of 90 =
CALCULATE (
    COUNTROWS (
        SUMMARIZE ( Summary, Summary[Ticket Number], Summary[Total Score] )
    ),
    Summary[Total Score] >= .9
)

Regards
Zubair

Please try my custom visuals
nickchobotar
Skilled Sharer
Skilled Sharer

Hi @joshcomputer1

 

Please post a data sample.

 

Thanks

There are many columns here, but you can see that the ticket number is redundant due to unpivoting the table. I just need the count if the ticket number value is unique. 

 

Capture1.PNG

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.