In this example, we will create a role in the tabular model and authorize it to access only the data of the year 2008. We will also show you how to use perspectives to provide a better view for users by performing the following steps:
In the Model menu, click on Roles. Create a new role and name it as
SampleRole
. Set its permission as Read.Write the following DAX filter in front of the Date row:
='Date'[CalendarYear]=2008
Save changes and analyze the model in Excel. In the Analyze option in the Excel window, choose SampleRole under Roles.
Select the Calendar hierarchy under Date and the Sum of Sales Amount measure; you will only see data for 2008 shown for this role.
Go to SSDT and under the Model menu, click on Perspectives and then Create and Manage. Create a new perspective and name it
Product
Perspective
. Select only Product, InternetSales, and Date for this perspective, as shown in the following screenshot: