Greg_Deckler
Community Champion
7 years agoChildless
The goal of this Quick Measure is to identify rows, in this case emails in email threads, that have no replies (children). Thus, these rows identify the last email in a thread of emails.
Childless = VAR __table = ALL('Emails')
VAR __table1 = ADDCOLUMNS(__table,"__count",COUNTX(FILTER(__table,[parentactivityid]=EARLIER(Emails[emailid]) && [createdon]>EARLIER([createdon])),[emailid]))
VAR __table2 = FILTER(__table1,[__count]<1)
RETURN
CONCATENATEX(__table2,[emailid],",")
eyJrIjoiYjQyMTg1NDQtYmFlYy00YTQxLWJhODQtMmI0NGUwNjc0M2I2IiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9
No RepliesBe the first to reply