Plan row-level security for a BI report
A row-level security design that maps users to the data they may see, with roles, rules, testing steps, and edge cases.
The prompt
Help me design row-level security (RLS) so each user sees only the data they are allowed to see in a BI report.
BI tool: [e.g. Power BI, Tableau, Looker, Qlik]
Report and audience: [what it shows and who uses it]
Access rules in plain English: [e.g. "regional managers see their region; sales reps see only their accounts; finance sees all"]
Data model: [tables and relationships, where territory or owner fields live]
Where user identity comes from: [e.g. email/UPN, groups in Azure AD or Okta, HR system]
Steps:
1. Recommend static roles vs. dynamic (data-driven) security, and why, given how often access changes.
2. Design the security mapping table: columns, grain, who maintains it, and how it stays in sync with HR or CRM changes.
3. Write the filter rules or expressions for each role in my tool, and show how filters flow through relationships.
4. Handle edge cases: users with multiple regions, managers seeing their whole hierarchy, temporary access, people who change roles, and users with no mapping (default to no data, not all data).
5. Note leakage risks: totals or aggregates that reveal restricted data, drill-through, exports, and measures that ignore filters.
6. Plan testing: a test matrix of users vs. expected rows, and how to "view as" a role.
Return the role design, the mapping table spec, the rule code, an edge-case table, the test matrix, and a short owner runbook. Remind me to confirm the access rules with the data owner and any privacy or compliance requirements before go-live.
Highlighted [brackets] are blanks to replace with your own details.
Fill in the blanks and use this promptMore Data & Analysis prompts
What to fill in
- e.g. Power BI, Tableau, Looker, Qlik
- what it shows and who uses it
- e.g. email/UPN, groups in Azure AD or Okta, HR system
How this prompt is built
This prompt follows the Few-Shot structure (Few-shot prompting). A few-shot prompt includes one or more worked examples of the input and the output you want, so the model can copy the pattern instead of guessing it.
Related prompts
- Break down my results into the business drivers behind themBuilds a driver tree from your results, sizes how much each driver contributed to the change, and names which ones to act on.
- Explain my Excel model to a non-technical executiveTurns a complex spreadsheet or model into a plain-English walkthrough an executive can follow, trust, and question.
- Forecast the next few months from historical data in ExcelBuilds a simple, explainable forecast from your past numbers, with trend and seasonality, a range, and the Excel steps to reproduce it.
- Run a fair lending review of loan pricing and approval dataA structured fair lending analysis plan and readout that tests for disparities in approvals, pricing, and exceptions.