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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
selinozdemirpbi
New Member

Average answer time for chat messages

Hi, i want to find average answer time for a spesific group. 

Receivers may be change, i should examine all conversations seperately. 

 

Table is like that:

sender_idreceiver_iddate-hourspesific_group
2101.01.2022 09:00No
1201.01.2022 09.10Yes
1302.01.2022 10:00Yes
3102.01.2022 13.00No
1302.01.2022 13.30Yes
5602.02.2022 15.00Yes
6502.02.2022 15.30No
5602.02.2022 15.40Yes

 

for ex, sender 1's average answer time is 10 minutes from the conversation with 2 and 30 minutes from the conversation with 3. 

It means that average answer time for 1 is 20 minutes. 

And for number 5, average time is 10 minutes.

 

I hope I have been able to explain, thank you 

If it's too complicated I'm open for another approximate solutions

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @selinozdemirpbi ,

Please have a try.

Measure =
VAR _a =
    SUMMARIZE (
        'Table',
        'Table'[sender_id],
        'Table'[receiver_id],
        "Time",
            DATEDIFF (
                MAXX (
                    FILTER (
                        ALL ( 'Table' ),
                        [sender_id] = EARLIER ( 'Table'[receiver_id] )
                            && [receiver_id] = EARLIER ( 'Table'[sender_id] )
                            && [spesific_group] = "No"
                    ),
                    [date-hour]
                ),
                MAX ( 'Table'[date-hour] ),
                MINUTE
            )
    )
RETURN
    AVERAGEX ( _a, [Time] )

vrongtiepmsft_0-1690422557492.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @selinozdemirpbi ,

Please have a try.

Measure =
VAR _a =
    SUMMARIZE (
        'Table',
        'Table'[sender_id],
        'Table'[receiver_id],
        "Time",
            DATEDIFF (
                MAXX (
                    FILTER (
                        ALL ( 'Table' ),
                        [sender_id] = EARLIER ( 'Table'[receiver_id] )
                            && [receiver_id] = EARLIER ( 'Table'[sender_id] )
                            && [spesific_group] = "No"
                    ),
                    [date-hour]
                ),
                MAX ( 'Table'[date-hour] ),
                MINUTE
            )
    )
RETURN
    AVERAGEX ( _a, [Time] )

vrongtiepmsft_0-1690422557492.png

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors