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
Gecko1919
Frequent Visitor

Challenging -Compare Persons Qualifications to multiple job to show how many people qualify for job

Hi All,

 

I am trying to compare a persons qualificaitons vs multiple jobs qualifications to get a total number of people that match at least 75% of the requirements against each job .  So the data would look like below.  Ultimately i want to show for Job A how many people met 75% or more of the requirements.  I am struggling to figure how to do the compare in Power BI so i can then visualize the result.

 

Job ID  Requirements

A            1

A            2

A            3

B             1

B             4

C            2

C            5

 

Person ID    Qualification

A1                   1

A1                  2

A1                    5

B1                     2

B1                    3

B1                  5

C1                1

C1                 2

C1                 3

 

 

 

1 ACCEPTED SOLUTION
AlB
Super User
Super User

Hi @Gecko1919 

You'd need a column for the jobID in the second table. With that:

1. Place Table2[Job ID] in the rows of a table visual

2. Place this measure in the visual:

Measure =
VAR Req_ =
    CALCULATETABLE (
        DISTINCT ( Table1[Requirements] ),
        FILTER (
            ALL ( Table1[Job ID] ),
            Table1[Job ID] = SELECTEDVALUE ( Table2[Job ID] )
        )
    )
RETURN
    SUMX (
        DISTINCT ( Table2[PersonID] ),
        INT (
            DIVIDE (
                COUNTROWS (
                    INTERSECT (
                        SELECTCOLUMNS (
                            CALCULATETABLE ( DISTINCT ( Table2[Qualification] ) ),
                            "Requirements", [Qualifications]
                        ),
                        Req_
                    )
                ),
                COUNTROWS ( Req_ )
            ) >= ( 75 / 100 )
        )
    )

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

 

View solution in original post

2 REPLIES 2
AlB
Super User
Super User

Hi @Gecko1919 

You'd need a column for the jobID in the second table. With that:

1. Place Table2[Job ID] in the rows of a table visual

2. Place this measure in the visual:

Measure =
VAR Req_ =
    CALCULATETABLE (
        DISTINCT ( Table1[Requirements] ),
        FILTER (
            ALL ( Table1[Job ID] ),
            Table1[Job ID] = SELECTEDVALUE ( Table2[Job ID] )
        )
    )
RETURN
    SUMX (
        DISTINCT ( Table2[PersonID] ),
        INT (
            DIVIDE (
                COUNTROWS (
                    INTERSECT (
                        SELECTCOLUMNS (
                            CALCULATETABLE ( DISTINCT ( Table2[Qualification] ) ),
                            "Requirements", [Qualifications]
                        ),
                        Req_
                    )
                ),
                COUNTROWS ( Req_ )
            ) >= ( 75 / 100 )
        )
    )

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

 

Gecko1919
Frequent Visitor

Going to be a bit to implement.  Thankyou sooo much for the response.   If i can get it working i will for sure mark as solved and give major kudos.  I will let you know how it goes.

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.