Creating a Report level View Filter in Tableau (1 report varying view depending on tableau user logged in)
You want a report to show an employee’s daily sales and for the employee to only see his data and manager to see all his employees’ data.
1. create mapping table with user_manager along with the daily sales data
table 1: user_manager
table 2: user_sales
date, sales_amt, user_name
2018/03/04, $20, mike_s
2018/03/03, $20, mike_s
join two objects together in tableau or before it.
select a.user_name, a.manager_name, b.date, b._sales_amt from user_manager a join user_sales b on a.user_name= b.user_name
now we have: user_name, manager_name, date, sales_amt
2. create tableau to import the entire object of two tables.
3. create calculated field called permission similar. *most important*
with formula username() = manager_name
4. add and apply permissions filter to tableau workbook
source of this example: