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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.