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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
random_Bi_User
Frequent Visitor

Get the amount of values for a specific id with added filters

Hi All!

 

I am relativly new to Power Bi and Im failing on such a simple task. Hopefully someone can help me with that.
I have a table the following table:

 

Sales ID Payment Method
1cash
1card
2

cash

2

paypal

3

paypal

 

I tried to create a measure which calculates the number of payments with multiple payment methods when paypal is used. 
So the result in this case would be that there is one payment with multiple methods when one is paypal (Sales ID 2).
I tried to get the result in multiple ways. One was to use the Summarize function to group the table by sales id and than create a row which retrieves the number of payment methods used and filter that with payment method = paypal.

Either way I did not get it done to create the measure. I hope someone of you might have a good solution for this. 
Thanks in advance!

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Try this:

COUNTROWS (
    FILTER (
        ADDCOLUMNS (
            VALUES ( Table1[Sales ID ] ),
            "Methods", CALCULATE ( DISTINCTCOUNT ( Table1[Payment Method] ) ),
            "UsedPaypal", "paypal" IN CALCULATETABLE ( VALUES ( Table1[Payment Method] ) )
        ),
        [Methods] > 1 && [UsedPaypal]
    )
)

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

Try this:

COUNTROWS (
    FILTER (
        ADDCOLUMNS (
            VALUES ( Table1[Sales ID ] ),
            "Methods", CALCULATE ( DISTINCTCOUNT ( Table1[Payment Method] ) ),
            "UsedPaypal", "paypal" IN CALCULATETABLE ( VALUES ( Table1[Payment Method] ) )
        ),
        [Methods] > 1 && [UsedPaypal]
    )
)

Hello Alexis. Thank you so so much!
It worked perfectly. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.