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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Chris_23
Helper II
Helper II

Counting the rows where the value is greater than a benchmark

Hi,

 

I want to get the number of rows where the offer of a selectedvalue is higher compared to the benchmark "Fozzie Bear".

PBIX:

https://1drv.ms/u/s!AsLM3f2rQCP34xv34CARLr8vZ0bv?e=NNzvVi

 

For example, if I select "Rizzo the Rat", then Count = 1, since
Project MPS: Fozzie Bear 433,015 > Rizzo the Rat 316,426
Project Disney World: Rizzo the Rat 449,034 > Fozzie Bear 256,240

 

Chris_23_0-1673365793009.png

 

However, the Measure Count shows

Count = Calculate(COUNT('Table'[Job]),Filter('Table',calculate(MAX('Table'[Offer]),'Table'[Vendor]="Fozzie Bär") < calculate(MAX('Table'[Offer]),'Table'[Vendor]=selectedvalue('Table (2)'[Vendor]))))

= 2

 

Any idea what to improve?

 

Kind regards

Chris

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

Hi @Chris_23 ,

 

Please try:

Count =
VAR _a =
    SUMMARIZE (
        'Table',
        'Table'[Job],
        'Table'[Vendor],
        "Flag",
            IF (
                SUMX (
                    FILTER (
                        ALL ( 'Table' ),
                        [Job] = EARLIER ( 'Table'[Job] )
                            && [Vendor] = "Fozzie Bär"
                    ),
                    [Offer]
                )
                    < SUM ( 'Table'[Offer] ),
                1
            )
    )
RETURN
    IF ( ISFILTERED ( 'Table (2)'[Vendor] ), SUMX ( _a, [Flag] ) )

Output:

vjianbolimsft_0-1673403124304.png

Best Regards,

Jianbo Li

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

2 REPLIES 2
Chris_23
Helper II
Helper II

Hi @v-jianboli-msft ,

 

thanks a lot.

v-jianboli-msft
Community Support
Community Support

Hi @Chris_23 ,

 

Please try:

Count =
VAR _a =
    SUMMARIZE (
        'Table',
        'Table'[Job],
        'Table'[Vendor],
        "Flag",
            IF (
                SUMX (
                    FILTER (
                        ALL ( 'Table' ),
                        [Job] = EARLIER ( 'Table'[Job] )
                            && [Vendor] = "Fozzie Bär"
                    ),
                    [Offer]
                )
                    < SUM ( 'Table'[Offer] ),
                1
            )
    )
RETURN
    IF ( ISFILTERED ( 'Table (2)'[Vendor] ), SUMX ( _a, [Flag] ) )

Output:

vjianbolimsft_0-1673403124304.png

Best Regards,

Jianbo Li

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors