You can set it up as a Data Source Filter, which will limit the data brought into Tableau.. If you have security info in your database somewhere, you can use conditional joins in Tableau to limit the data as well. You may want to look over this thread which shows some options (the second one uses info stored in your DB, which is what it sounds like you want)
Hey Rahul -
The user filter should be applied at the database level by adding a WHERE clause to the query being issued. You shouldn't be fetching all data to Tableau and then filtering it there. Are you sure this is happening? How are you testing for same?
Regardless, adding your calcualation / filter to the data source is generally better because you don't have to remember to add it to each and every view.
Hope this helps!
1 of 1 people found this helpful
Thanks for reply.
Actually i will expain the scenario in detail then it would be better-
I have my fact table which contains data (country is one of the column in that),I have 1 more table i.e security table which contains ID of each individual and corresponding country which he has access.
So I am joining these two tables in connection string on basis of country.
Problem I am facing-
While I am making join between these two tables in connection I want to put a where condition i.e ID=USerName().
But tableau is not taking this.If am able to use where in connection string it will help in filtering the data while fetching only.
Suggestions which I got-User Filters and Row Level Security | Tableau Software
But if we go with this approach I am taking all the data from database and then filtering in tableau.
Hi! Can you explain what you mean when you say "Tableau is not taking this"? Are you seeing an error? Are you able to create the expression but then can't use it?
Sent from my phone -- please excuse brevity, misspellings, and tone