Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
MatH
Frequent Visitor

Counting repeat callers

I want to be able to have a card that reports on repeat callers.

 

The table basically looks like this:

 

MatH_0-1657545815870.png

The CLI column is the users phone number, I wanted to be able to count how many times someone has called more than 5 times in a day. Then have a card that can report '25 people called more than 5 times in a day' I have a date table and slicers so hopefully this would the update to reflect that.

 

I know how to distict count to see how many unique callers, and also I managed to add a column which showed how many times that person had called in total. But not a way to just simplify it to be be X called >5 times.

 

I'm struggling with how to do this at the moment though, any help would be greatly appreciated.

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

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"

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I tried to create a sample pbix file like below.

I hope the below can provide some ideas on how to create a solution for your data model.

Please check the below picture and the attached pbix file.

 

Picture3.png

 

expected measure: =
COUNTROWS (
    FILTER (
        ADDCOLUMNS (
            VALUES ( Data[CLI] ),
            "@callcountperday", CALCULATE ( COUNTROWS ( Data ) )
        ),
        [@callcountperday] > 4
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


tamerj1
Super User
Super User

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"
MatH
Frequent Visitor

Thank you, I've just tried testing it and it seems to have worked perfectly. Much appreciated

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.