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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have one csv-based data source that contains employees and skills data. Here's a simplified version of the data file:
For the dashboard, user would like to know the top 5 skills in their respective department. A user from HR would get this result:
The next requirement that I'm struggling with is to find employees with matching skills that sit in other departments. The expected results:
Any advice?
Solved! Go to Solution.
Hi @Anonymous ,
Please try the following measures:
CountSkill = COUNT ( 'Table'[Skill] )TOP5 =
VAR ranknum =
RANKX (
ALLSELECTED ( 'Table'[Skill] ),
CALCULATE (
[CountSkill],
ALLEXCEPT ( 'Table', 'Table'[Skill], 'Table'[Department] )
),
,
DESC,
SKIP
)
RETURN
IF ( MAX ( 'Table'[Department] ) = "HR" && ranknum <= 5, ranknum )Measure =
VAR tab =
FILTER (
SUMMARIZE (
ALLSELECTED ( 'Table' ),
'Table'[Department],
'Table'[Skill],
"Top", [TOP5]
),
[Top] <> BLANK ()
)
RETURN
IF (
MAX ( 'Table'[Department] ) <> "HR"
&& MAX ( 'Table'[Skill] ) IN CALCULATETABLE ( ALLSELECTED ( 'Table'[Skill] ), tab ),
1
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try the following measures:
CountSkill = COUNT ( 'Table'[Skill] )TOP5 =
VAR ranknum =
RANKX (
ALLSELECTED ( 'Table'[Skill] ),
CALCULATE (
[CountSkill],
ALLEXCEPT ( 'Table', 'Table'[Skill], 'Table'[Department] )
),
,
DESC,
SKIP
)
RETURN
IF ( MAX ( 'Table'[Department] ) = "HR" && ranknum <= 5, ranknum )Measure =
VAR tab =
FILTER (
SUMMARIZE (
ALLSELECTED ( 'Table' ),
'Table'[Department],
'Table'[Skill],
"Top", [TOP5]
),
[Top] <> BLANK ()
)
RETURN
IF (
MAX ( 'Table'[Department] ) <> "HR"
&& MAX ( 'Table'[Skill] ) IN CALCULATETABLE ( ALLSELECTED ( 'Table'[Skill] ), tab ),
1
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is super neat. Thank you so much.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 35 | |
| 34 | |
| 28 |
| User | Count |
|---|---|
| 136 | |
| 99 | |
| 73 | |
| 66 | |
| 65 |