Forum Discussion

MatH's avatar
MatH
Frequent Visitor
4 years ago
Solved

Counting repeat callers

I want to be able to have a card that reports on repeat callers.   The table basically looks like this:   The CLI column is the users phone number, I wanted to be able to count how many tim...
  • tamerj1's avatar
    4 years ago

    Hi MatH 
    Please try

    More Than 5 Calls =
    VAR T1 =
        SUMMARIZE (
            TableName,
            TableName[CLI],
            TableName[Date],
            "@NumberOfCalls", COUNTROWS ( TableName )
        )
    VAR T2 =
        FILTER ( T1, [@NumberOfCalls] > 5 )
    VAR T3 =
        SELECTCOLUMNS ( T2, "@CLI", TableName[CLI] )
    VAR Result =
        COUNTROWS ( DISTINCT ( T3 ) )
    RETURN
        Result & "people called more than 5 times in a day"