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

Need help with DAX to get unique occurence record counts in table

Hi ,

 

Need help with DAX measure and scnario as follows-

From_IDConversation_IDCIDConcat(From_ID,Conversation_ID)
SanCON11San_CON1
SanCON12San_CON1
SanCON13San_CON1
SeaCON21Sea_CON2
SeaCON31Sea_CON3
SeaCON41Sea_CON4
SubCON51Sub_CON5
SubCON61Sub_CON6
RamCON661Ram_CON66
RanCON6661Ran_CON666

 

 

expected Out put

Unique Records Count - 3 (distinct count of From_ID where distinct count(Concat) = 1)

Duplicate Recrd count - 2 (distinct count of From_ID where distinct count(Concat) > 1)

 

Please help with DAX query

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try measures like

countx(filter(summarize(Table, table[From_ID], "_1", distinctcount(Table[Concat])), [_1] =1),[From_ID])

 

countx(filter(summarize(Table, table[From_ID], "_1", distinctcount(Table[Concat])), [_1] >1),[From_ID])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try measures like

countx(filter(summarize(Table, table[From_ID], "_1", distinctcount(Table[Concat])), [_1] =1),[From_ID])

 

countx(filter(summarize(Table, table[From_ID], "_1", distinctcount(Table[Concat])), [_1] >1),[From_ID])

Anonymous
Not applicable

Thanks a lot Amit the measure worked perfectly and one great learning on usage of summary function in COUNTX.

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.