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

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.