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

DAX, find all employees with selected(or better) skillset.

Hi,

 

I have the following table:

 

table.PNG

 

What I wanted to do was to create a measure that would show me only employees with a given skillset(so for example all who are expert at python AND good at scala.

 

What I have done:

1. Create the CONCAT column.

2. Create the following measures:

All Selected Tools = COUNTROWS(SUMMARIZE(ALLSELECTED(Employees), Employees[CONCAT]))
All Selected Tools Dev = CALCULATE(DISTINCTCOUNT(Employees[CONCAT]), ALLSELECTED(Employees[CONCAT]))
SELECTED = IF([All Selected Tools]=[All Selected Tools Dev], 1, 0)
3. Set filter on my visual selected = 1
result2.PNG

 

However, what I would like to do now, is to find all employees who have the selected skillset OR better.

So in this case, I would like to see both employees A and B, since employee B is EXPERT in python(we select python = GOOD and scala = GOOD but EXPERT>GOOD).

 

I have added this column called 'LevelValue' to be able to measure that but now I really don't know how to go forward. Thank you for any hints. 

 

Here is the link to my file:

https://www.dropbox.com/s/nk6qw0sjz5ae6db/example.pbix?dl=0

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

Hi  @PBIAlpaca  ,

Here are the steps you can follow:

1. Create calculated table.

Table = 'Employees'

2. Create measure.

Flag =
IF(
    MAX('Employees'[Tool]) in SELECTCOLUMNS('Table',"1",[Tool]),
    IF(
        MAX('Employees'[LevelValue])>=MAXX(FILTER('Table',[Tool]=MAX('Employees'[Tool])),[LevelValue]),1,0),0)

3. Put the flag into the filter and set flag = 1

v-yangliu-msft_0-1616576433125.png

4. Result.

v-yangliu-msft_1-1616576433131.png

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @PBIAlpaca  ,

Here are the steps you can follow:

1. Create calculated table.

Table = 'Employees'

2. Create measure.

Flag =
IF(
    MAX('Employees'[Tool]) in SELECTCOLUMNS('Table',"1",[Tool]),
    IF(
        MAX('Employees'[LevelValue])>=MAXX(FILTER('Table',[Tool]=MAX('Employees'[Tool])),[LevelValue]),1,0),0)

3. Put the flag into the filter and set flag = 1

v-yangliu-msft_0-1616576433125.png

4. Result.

v-yangliu-msft_1-1616576433131.png

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

Jihwan_Kim
Super User
Super User

Hi,

Please kindly check the below measure and pbix file link.

 

Picture1.png

 
Level or better Select =
VAR levelvalue =
SELECTEDVALUE (
'Levels'[LevelValue],
0
)
VAR levelselect =
FILTER (
ALL ( 'Levels'[LevelValue] ),
'Levels'[LevelValue] >= levelvalue
)
VAR toolselect =
ALLSELECTED ( Tools[Tool] )
RETURN
IF (
NOT ISFILTERED ( Tools[Tool] )
&& NOT ISFILTERED ( 'Levels'[LevelValue] ),
BLANK (),
IF (
SELECTEDVALUE ( Employee[LevelValue] )
IN levelselect
&& SELECTEDVALUE ( Employee[Tool] )
IN toolselect,
1,
BLANK ()
)
)
 
 
Did I answer your question? Mark my post as a solution!

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Thank you, that's a very nice solution. Although my whole problem is that I still need to be able to select multiple combinations of specific tools & levels. So for example all employees who are Good (or better) at python AND Limited (or better) at Scala. Also to exclude the ones who have only one of the specified skills(as we are interested in a specific skillset).

Anonymous
Not applicable

Hi @PBIAlpaca 

Concat all the columns from this table, dont leave anything. Then download a custol visual text filter. Drag this column in this visual. Post this, write any skill set you will get the results.

 

Please mark this solution as accepted.

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.