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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
avotius
Frequent Visitor

Card with average count excluding 1's

Hello, my dataset is customer service data with a date, thread id, subject, and message. Every time there is a message a new row is populated, and if it was part of an ongoing message the thread id is the same.

 

What I am trying to do is make a card that will count the amount of messages in a thread, then give me an average of all threads, but exclude any thread where the count is 1 as that would be a new thread that has not been touched. 

 

I made a quick measure and this is what it gave me, but I can't use the filter on the visual for "show items when value..." as the drop down does not work and the input box is greyed out. Any ideas? Thanks!

 

Average ThreadId =
AVERAGEX(
    KEEPFILTERS(VALUES('CareConvos'[ThreadId])),
    CALCULATE(COUNTA('CareConvos'[ThreadId]))
)
1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

I would try a measure like this one.

 

Avg Messages Per Thread =
VAR summary =
    SUMMARIZE (
        'CareConvos',
        'CareConvos'[ThreadId],
        "cCount"COUNT ( 'CareConvos'[ThreadId] )
    )
RETURN
    AVERAGEX ( FILTER ( summary, [cCount] > 1 ), [cCount] )

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
avotius
Frequent Visitor

Thanks a million Pat! That actually worked perfectly. Now I am going to pick it apart and try to figure out why it works!

mahoneypat
Microsoft Employee
Microsoft Employee

I would try a measure like this one.

 

Avg Messages Per Thread =
VAR summary =
    SUMMARIZE (
        'CareConvos',
        'CareConvos'[ThreadId],
        "cCount"COUNT ( 'CareConvos'[ThreadId] )
    )
RETURN
    AVERAGEX ( FILTER ( summary, [cCount] > 1 ), [cCount] )

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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