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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

How to find repetitive values

Hi,

 

I am trying to create a measure that can limit the number of hang up calls. Sth. like this:

if a Calling Party Nr repeates more than 5 times a day, set the # of hang up calls to 5, else set the current number.

How can I do that?

 

Thanks!

 

vestas_1-1654642278539.png

 

 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Pls test the below:

test = 
VAR test1 =
    CALCULATE (
        SUM ( 'Table'[# of hang up calls] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date] = MAX ( 'Table'[Date] )
                && 'Table'[Calling Party NR] = MAX ( 'Table'[Calling Party NR] )
        )
    )
RETURN
    IF ( test1 >= 5, 5, MAX ( 'Table'[Calling Party NR] ) )

Output result:

vluwangmsft_0-1654851966155.png

 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

View solution in original post

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Pls test the below:

test = 
VAR test1 =
    CALCULATE (
        SUM ( 'Table'[# of hang up calls] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date] = MAX ( 'Table'[Date] )
                && 'Table'[Calling Party NR] = MAX ( 'Table'[Calling Party NR] )
        )
    )
RETURN
    IF ( test1 >= 5, 5, MAX ( 'Table'[Calling Party NR] ) )

Output result:

vluwangmsft_0-1654851966155.png

 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

danextian
Super User
Super User

Hi @Anonymous 

These measure below will count the number of hang up calls per number per date regardless of the filter context.

Count of Hang Up Calls per Nr and Date =
CALCULATE (
    COUNTROWS ( Table ),
    ALLEXCEPT ( Table, Table[Date], Table[Calling Party Nr] )
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
johncolley
Solution Sage
Solution Sage

Hi @Anonymous ,

 

Create the following measures:

Hang up calls = SUM('Table'[# of Hang up calls])
limitto5 = SWITCH(
TRUE(),
[Hang up calls] > 5, 5,
[Hang up calls] <=5, [Hang up calls]
)

If this solution solved your problem, please mark it as a solution!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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