Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
user-2024
Frequent Visitor

Unselected value

Hi all,
I'm trying to create comparison between data. In particular, I want to compare data of the selected Employee against the data of all the unselected employees.
I have a filter on the page to select a single employee, trying to use the selected/unselected as legend of a scatter chart. Is it possible?
Example:
Employee A, employee B, employee C. If the user select in the filter employee A, the scatter chart will show the points of employee A and then employee B + employee C as "Other employees".
Thanks

5 REPLIES 5
Anonymous
Not applicable

Thanks for the reply from Sahir_Maharaj.

 

Hi @user-2024,

 

Based on your description I created simple data:

vlinhuizhmsft_0-1732159868522.png

 

Create two new tables on top of this, one for the legend of the scatter chart and one for the slicer.

vlinhuizhmsft_1-1732159989777.png

vlinhuizhmsft_2-1732160009910.png

 

Then create a measure:

Measure = 
VAR _selected=SELECTCOLUMNS('EmployeeSlicer','EmployeeSlicer'[Employeename])
VAR _unselected=EXCEPT(ALL('EmployeeTable'[Employeename]),_selected)
VAR _unselectedtotal=SUMX(FILTER(ALL('EmployeeTable'),'EmployeeTable'[Employeename] IN _unselected),'EmployeeTable'[Value])
RETURN 
SWITCH(MAX('NewEmployee'[Employeename]),"other employees",_unselectedtotal,SELECTEDVALUE('EmployeeSlicer'[Employeename]),SUM('EmployeeTable'[Value]))

 

Results:

vlinhuizhmsft_3-1732160132185.png

vlinhuizhmsft_4-1732160245179.png

 

Best Regards,
Zhu

 

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

Also in your sample data, the others employee total doesn't reflect the year, but it's constant considering both 2023 and 2024.

user2024_0-1732179184319.png

Thanks for the reply. The output is near to what I wanted, but there's still somethinf to fix. I exaplin better the expected result.
As you see in the image, for the active employee (light blue) the dots are okay. While for the Others, the value is constant to the average of all of them, regardless of the x-axis. Is it possible to have also for the Others employee, not an aggregation, but all the points with their single value?
Expected outcome:

user2024_1-1732179385308.png

 

Sahir_Maharaj
Super User
Super User

Hello @user-2024,

 

Can you please tyr this approach:

Employee Category = 
VAR SelectedEmployee = SELECTEDVALUE(EmployeeTable[EmployeeName])
RETURN 
    IF(
        ISBLANK(SelectedEmployee),
        "All Employees",
        IF(
            EmployeeTable[EmployeeName] = SelectedEmployee,
            "Selected Employee",
            "Other Employees"
        )
    )

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Thanks for the reply.
The scatter chart does not allow me to put a measure as a legend

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.