Forum Discussion
user-2024
1 year agoFrequent 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...
Anonymous
1 year agoNot applicable
Thanks for the reply from Sahir_Maharaj.
Hi user-2024,
Based on your description I created simple data:
Create two new tables on top of this, one for the legend of the scatter chart and one for the slicer.
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:
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.
user-2024
1 year agoFrequent Visitor
Also in your sample data, the others employee total doesn't reflect the year, but it's constant considering both 2023 and 2024.