If you enjoy the visual experience of editing perspectives in SQL Server Data Tools (SSDT) and wish that Tabular Editor had such a feature, you are now in luck. I wrote a program (which is available on my GitHub) that creates a similar 'perspective editor' experience inside of Tabular Editor.
To run this program simply follow these steps:
Open your model within Tabular Editor.
Paste the program's script into the Advanced Scripting window.
Click the Play button (or F5).
Once you open the Perspective Editor program, the interface is quite simple. When you first run the script you will choose whether you want to create a new perspective or modify an existing perspective.
After making this selection, press Go. Next, you are presented with a tree view of all the tables, columns, measures, and hierarchies within your model (see images below). Here you can select any object you want to include in the perspective. Clicking the 'Create Perspective' button will create a new perspective, named as you specified, with the the selected objects included. Clicking the 'Modify Perspective' button will modify the existing perspective to include the objects selected.
To make this program easier to run, I recommend adding it as a Custom Action. This will allow you to run the program anytime - without having to copy and paste the script. In fact, I recommend doing this with the all the programs I have created which are available here. To create this as a Custom Action, follow the steps below.
1. Click the Plus sign within the Advanced Scripting pane.
2. Fill out the form as below. Make sure to check all the checkboxes.
3. Click OK.
After completing these steps, this script is now saved as a Custom Action and can be called and opened at any time by clicking within the 'Samples' button on the Advanced Scripting pane, selecting 'Custom Actions' and then selecting 'PerspectiveEditor'.
Conclusion
This program/script provides a visual interface for editing perspectives which may be more user-friendly to some developers. Additionally, the ability to see which objects are in a perspective relative to all the objects in the model may be quite useful. Lastly, this script is just a small preview of something bigger coming for tabular model enhancement.
Sounds like there may be an issue with the .bim file. If you're able to send me the .bim file I may be able to help you. Can send it to mk@elegantbi.com.
Hi MK, It's giving me syntax errors for one particular model. is it because i am connected to model using model.bmi file ? but when i tried for another smaller model it works fine. So, just wondering why it would work for one model and not for the other ?
Hi, the speed of the script is not dependent on the size of the model. The reason the script takes a few seconds to load since it dynamically fetches the images needed for the tool from GitHub.
Hi, This script work fine when model is relatively small but is not working when Model is too big. Is there a way to run it just for particular selected tables ?