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.
Hello!
I have a table of employess and competences. I need to create a tool to for the user to select the employee based on his/her cmpetences. But, if the user select more than one I need powerBI to show only the ones who has that selected competences.
Anyone can give-me a clue? Thnaks a lot!
Solved! Go to Solution.
HI @AndreWahlbuhl,
You can refer to the following steps to achieve your requirement.
Steps:
1. Extract skill value from the raw table to create a calculated table selector.
Selector = VALUES('Table'[Skill])
2. Write a measure to compare the value between selection and current table row contents.
All Match =
VAR selection =
VALUES ( Selector[Skill] )
VAR summary =
FILTER (
GROUPBY (
FILTER ( ALLSELECTED ( 'Table' ), [Skill] IN selection ),
[Name],
"SC", COUNTX ( CURRENTGROUP (), [Skill] )
),
[SC] = COUNTROWS ( selection )
)
RETURN
IF (
SELECTEDVALUE ( 'Table'[Name] ) IN SELECTCOLUMNS ( summary, "Name", [Name] ),
"Y",
"N"
)
3. Use the selector table field to create a slicer, raw table fields create a table visual. Then apply measure on table visual 'visual level filter ' to filter records.
I also attached the sample file below.
Regards,
Xiaoxin Sheng
Hi @AndreWahlbuhl,
I'm not so clear for your description, can you please explain more about them with some dummy data and expected result?
How to Get Your Question Answered Quickly
Do you mean if the user selects multiple items and you want to display the employees that match with the selection ranges? if this a case, I'd like to suggest you use an unconnected table as the source of slicer, then you can write a measure to compare current row contents and selection ranges (use in operator) and applied on the 'visual level filter' of your visuals.
Applying a measure filter in Power BI
Regards,
Xiaoxin Sheng
Hello @v-shex-msft , I am very pelased you are atryin to help me and I am sorry for not been specific.
In fact, the links and descriptions you told was usefull in other subjects I had. But for that doubt, I´ll try to express myself cleary.
Dummy Table
Name | Skill |
Andre | Math |
Andre | Social Science |
Charles | Math |
Charles | Chemistry |
Charles | Computer Logic |
Anna | Biology |
Anna | Computer Logic |
Anna | Math |
When selecting the desired qualifications, I would like the PBI to show only the person who has these specific characteristics.
Example:
When I select only Math, the system needs to show me either Andre, Charles and Anna.
But if I select Math and Computer Logic, it will only have to show me Charles and Anna because they´re only to have both skills.
Since then I am very pleased. Thaks for your help.
HI @AndreWahlbuhl,
You can refer to the following steps to achieve your requirement.
Steps:
1. Extract skill value from the raw table to create a calculated table selector.
Selector = VALUES('Table'[Skill])
2. Write a measure to compare the value between selection and current table row contents.
All Match =
VAR selection =
VALUES ( Selector[Skill] )
VAR summary =
FILTER (
GROUPBY (
FILTER ( ALLSELECTED ( 'Table' ), [Skill] IN selection ),
[Name],
"SC", COUNTX ( CURRENTGROUP (), [Skill] )
),
[SC] = COUNTROWS ( selection )
)
RETURN
IF (
SELECTEDVALUE ( 'Table'[Name] ) IN SELECTCOLUMNS ( summary, "Name", [Name] ),
"Y",
"N"
)
3. Use the selector table field to create a slicer, raw table fields create a table visual. Then apply measure on table visual 'visual level filter ' to filter records.
I also attached the sample file below.
Regards,
Xiaoxin Sheng
I am very thankful for your answer.
In fact it is very well explained and well detailed. If I could I woud give you an A++.
And sorry for dalying the answer, I had some personal trouble.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
2 | |
2 | |
1 | |
1 |