Forum Discussion
Anonymous
4 years agoNot applicable
count rows with some conditions
Hi everyone! I need to count the rows with same idticket, idclient after the first time that they appear. I also have to exclude duplicates so I only have to count once these records. The result is ...
Anonymous
4 years agoNot applicable
Thank you johnt75 , is it possible to show a table with the idclient, idticket and date_time for these occurrences?
johnt75
Super User
4 years agoI think you could add a calculated column as below, then filter out any entries which are 1
Is first entry =
var currentTicket = 'Table'[idticket]
var currentClient = 'Table'[idclient]
var currentDateTime = 'Table'[Date_time]
var numPrevEntries = CALCULATE( COUNTROWS('Table'), REMOVEFILTERS(), 'Table'[idclient] = currentClient && 'Table'[idticket] = currentTicket
&& 'Table'[Date_time] < currentDateTime )
return IF ( numPrevEntries = 0, 1, 0)