Forum Discussion
How to apply a measure filter based on path checking to a map visual
- 1 year ago
Hi Singularity9 ,
Thank you for reaching out to the Microsoft Community Forum.
Please follow below steps.
1. Created two tables (Employee, Table) with sample data, please refer below snap.
2. Created "Supervisor_Path" column in Employee table with below DAX.
Supervisor_Path = PATH('Employee'[Emp No], 'Employee'[Supervisor Search])
3. Created "Is_Subordinate_Measure" measure that checks whether a row is from a subordinate
Is_Subordinate_Measure =VAR CurrentUserEmpNo =LOOKUPVALUE('Employee'[Emp No],'Employee'[Email Address],USERPRINCIPALNAME())VAR RowEmpNo =SELECTEDVALUE('Table'[Emp No])VAR PathToCheck =LOOKUPVALUE('Employee'[Supervisor_Path],'Employee'[Emp No],RowEmpNo)RETURNIF (PATHCONTAINS(PathToCheck, CurrentUserEmpNo),1,0)4. Selected "Azure Map" and dragged below fields.Table[Latitude] as Latitude & Table[Longitude] as Longitude. Add the "Is_Subordinate_Measure" to Filters on this visual. Set the filter to "1".For testing, Please check below things.5. Selected "Table" visual , and draged the required columns from "Employee" table.6. In modeling tab -> View as -> and mentioned email address for testing.7. Please refer the output snap and attched PBIX file.If my response has resolved your query, please mark it as the "Accepted Solution" to assist others. Additionally, a "Kudos" would be appreciated if you found my response helpful.
Thank you
Hi Singularity9 ,
Thank you for reaching out to the Microsoft Community Forum.
Please follow below steps.
1. Created two tables (Employee, Table) with sample data, please refer below snap.
2. Created "Supervisor_Path" column in Employee table with below DAX.
Supervisor_Path = PATH('Employee'[Emp No], 'Employee'[Supervisor Search])
3. Created "Is_Subordinate_Measure" measure that checks whether a row is from a subordinate
If my response has resolved your query, please mark it as the "Accepted Solution" to assist others. Additionally, a "Kudos" would be appreciated if you found my response helpful.
Thank you
This worked, thank you! I had to remove the relationship between the two tables and modify other measures to account for that, but the end result is working well.