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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bglibkowski123a
Frequent Visitor

Benchmarking using Filters (selected and comparison to remainder)

I have a table with segments (e.g., Department, job tenure, education).  Each segment has selection options.  For example Departments (e.g., Marketing, Accounting, Finance).  I want to be able to select a segment option and see the average for that selected segment (e.g., Marketing = 80% average for Job Satisfaction).  Then I want to to be able to compare that Job Satisfaction score to all remaining departments combined together (e.g., Accounting and Finance departments Average of 75% Job Satisfaction).

 

The solution needs be dynamic in that I have multiple segments and the segments will change from report to report.  Therefore, I'm not looking for a solution that is manual, but is responsive to filtered/unfiltered selections. I'm stuck how to accomplish this with a DAX formula.

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @bglibkowski123a,

 

According to your description above, the formulas(DAX) should work in your scenario. Smiley Happy

 

Selected = CALCULATE ( AVERAGE ( 'Table1'[Job Satisfaction] ) )
Remainder =
CALCULATE (
    AVERAGE ( 'Table1'[Job Satisfaction] ),
    FILTER (
        ALL ( 'Table1' ),
        NOT (
            CONTAINS ( 'Table1', 'Table1'[Department], 'Table1'[Department] )
                && CONTAINS ( 'Table1', 'Table1'[job tenure], 'Table1'[job tenure] )
                && CONTAINS ( 'Table1', 'Table1'[education], 'Table1'[education] )
        )
    )
)

 

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @bglibkowski123a,

 

According to your description above, the formulas(DAX) should work in your scenario. Smiley Happy

 

Selected = CALCULATE ( AVERAGE ( 'Table1'[Job Satisfaction] ) )
Remainder =
CALCULATE (
    AVERAGE ( 'Table1'[Job Satisfaction] ),
    FILTER (
        ALL ( 'Table1' ),
        NOT (
            CONTAINS ( 'Table1', 'Table1'[Department], 'Table1'[Department] )
                && CONTAINS ( 'Table1', 'Table1'[job tenure], 'Table1'[job tenure] )
                && CONTAINS ( 'Table1', 'Table1'[education], 'Table1'[education] )
        )
    )
)

 

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors