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
DashMax
Frequent Visitor

Count the number of times text appears in a field only once

Hello,

I need some help creating a measure that I can display on a card that is the count of the number of times an item only appears in the list once.  I need the ability to slice this according to date or date range.

 

Sample Data

 

Request_table 
RequestIDICAODate
1BIKF1/31/2019
1CYVR1/31/2019
2EDFH4/20/2019
3EGSS3/22/2019
3KBIF3/22/2019
4KBWI5/2/2019
4KCID5/2/2019
7KCID6/4/2019
4KDAY5/2/2019
7KDAY6/4/2019
1KDFW1/31/2019
6KDFW10/5/2019
5KIAD12/2/2019
   
Total Requests = 13 

 

Column with counts

ICAOCount of ICAO
BIKF1
CYVR1
EDFH1
EGSS1
KBIF1
KBWI1
KCID2
KDAY2
KDFW2
KIAD1
  
Distinct count = 10

 

Expected data set and the card would display the count 7

ICAOCount of ICAO
BIKF1
CYVR1
EDFH1
EGSS1
KBIF1
KBWI1
KIAD1
  
Count with only one request = 7
Or the count of Request_table[ICAO] 
that only appears in the list once

 

How do i go about creating such a measure?

1 ACCEPTED SOLUTION
edhans
Super User
Super User

See if this works. I got a card with 7 shown.

 

All Unique Occurrances =
COUNTROWS (
    FILTER (
        SUMMARIZECOLUMNS (
            'Request Table'[ICAO],
            "Count", COUNTROWS ( 'Request Table' )
        ),
        [Count] = 1
    )
)

 

If you want a table to show up listing the ICAO numbers, you can use this measure:

Unique Occurance = 
VAR Occurrences = COUNTROWS('Request Table')
RETURN
IF(Occurrences = 1, Occurrences, BLANK())


Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

1 REPLY 1
edhans
Super User
Super User

See if this works. I got a card with 7 shown.

 

All Unique Occurrances =
COUNTROWS (
    FILTER (
        SUMMARIZECOLUMNS (
            'Request Table'[ICAO],
            "Count", COUNTROWS ( 'Request Table' )
        ),
        [Count] = 1
    )
)

 

If you want a table to show up listing the ICAO numbers, you can use this measure:

Unique Occurance = 
VAR Occurrences = COUNTROWS('Request Table')
RETURN
IF(Occurrences = 1, Occurrences, BLANK())


Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.