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.
I have a dataset of employees, which includes some additional information such as job title, department, and salary.
I want to allow users to select a given employee, then view visualizations for that employee's entire job title and department. For example, user selects Employee A, and then they view a scatter plot showing all the employee salaries in Employee A's department. Ideally, Employee A would be highlighted in this scatter plot
Any way to accomplish this within Power BI?
Hi @ats1958,
I have found an awesomeblog which may could help you achieve your idea output.
You could have a good look at this blog Highlighting Scatter Charts in Power BI using DAX.
Best Regards,
Cherry
I don't think this is quite what I need.
In the example, the dots in the scatter plot aren't changing, one is just being highlighted.
What I'm looking to do is display a subset of the data in the chart.
An example would be, if I have a list of cities, states, and populations, and a user selects "San Francisco," I'd want the chart to show all the cities in the California with their populations. And San Francisco would be highlighted in that chart.
Here is a mock-up of what I think you are looking for.
This could be done a number of ways depending on your existing tables, and my mock-up could well be adapted/simplified.
Selected Employee Flag = VAR EmployeesSelected = CALCULATETABLE ( VALUES ( Data[Employee] ), USERELATIONSHIP ( Data[Employee], 'Employee Filter'[Employee Filter] ), ALL ( Data ) ) RETURN IF ( NOT CALCULATE ( ISEMPTY ( VALUES ( Data[Employee] ) ), KEEPFILTERS ( EmployeesSelected ) ), 1 )
Selected Employee Department Flag = VAR DepartmentSelected = CALCULATETABLE ( VALUES ( Data[Department] ), USERELATIONSHIP ( Data[Employee], 'Employee Filter'[Employee Filter] ), ALL ( Data ) ) RETURN IF ( NOT CALCULATE ( ISEMPTY ( VALUES ( Data[Employee] ) ), KEEPFILTERS ( DepartmentSelected ) ), 1 )
Regards,
Owen
@OwenAuger This is close. However, I'm using a DirectQuery dataset with Power BI Embedded with RLS. Additionally, end users are uploading their own data to my database. Meaning that adding a new table creates a ton of headaches. Is there a workaround that doesn't involve another table?
Thanks
I can't see any way to avoid creating the additional Employee Filter table, since you need a way of selecting an Employee that doesn't filter your fact table.
Since you are using DirectQuery, you should still be able to add an Employee Filter table relatively easily. The only difference from my uploaded file is that you must create the Employee Filter in Power Query (rather than a DAX Calculated table as I did), for example by referencing your fact table, selecting that one column and using Table.Distinct.
Someone out there may have some alternatives though?
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 |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |