Forum Discussion
Error: Current session is no longer valid due to structural changes in the database
Sample Files and Steps to Reproduce the Error (5-10 minutes)
I have prepared 3 objects to help Microsoft reproduce this issue.
<<PM me for download link>>
File 1) Excel Sheet: "SampleData.xlsx"
- Contains 3 worksheets of small test data that is used for the tabular model source.
File 2) Tabular Model: "SampleTabularModel.abf"
- Contains 3 tables from Excel sample data and 2 perspectives (both of which contain 2 of the 3 tables).
- Created on SSAS version 14.0.239.1
File 3) Power BI: "SampleTabularPBIReport.pbix"
- Contains test visualizations based on the tabular model
- Created in Power BI Desktop December 2018 update
STEPS:
This is all meant to be done on the same SSAS test machine.
1) Put the file, "SampleData.xlsx" in the folder "C:\TEMP". (Otherwise you'll have to edit the SSAS "Connections" info for it in SSMS later.)
2) Restore the "SampleTabularModel.abf" file in SSAS 2017 to server, LOCALHOST.
- In the Restore Database dialog box, choose the "SampleTabularModel.abf" backup file.
- Enter "SampleTabularModel" for the "Restore Database" name, and the appropriate "Storage Location" for your environment.
- Click OK to complete the restore of the "SampleTabularModel" SSAS database.
3) Open the file, "SampleTabularPBIReport.pbix" in Power BI Desktop (not Desktop for Report Server). This is a simple report based on a connection to SSAS server LOCALHOST, database "SampleTabularModel", and perspective "TestPerspective1".
4) Click "Refresh" on the Power BI "Home" ribbon. The report should show data in all visuals (if it doesn't already).
5) Try adding any visual to the "SampleTabularPBIReport" report in Power BI, using the fields in the sample sheets as your data source. This should work fine.
6) Close Power BI Desktop and do not save changes to the report.
7) Open the "SampleTabularPBIReport" report in Power BI again. Do not do anything else in Power BI this time except open the file. Then go to the next step.
8) Switch over to SSMS, right-click on SSAS database name "SampleTabularModel", and select "Process Database".
9) In the "Process Database" dialog box, choose Mode = "PROCESS FULL", and make sure the "Model" box is checked, then click OK.
10) Wait for SSAS model processing to be successful (which should only take 2 seconds), then continue to the next step.
11) Go back to Power BI Desktop, where the "SampleTabularPBIReport" report is already open.
12) Do the same thing you did in step 5... Add any visual to the Power BI report using the available fields in the list. The visual you create will show up gray, with the caption, "Can't display the visual. See details." The details are, "Couldn't load data for this visual, Current session is no longer valid due to structural changes in the database."
13) To clear the error, click the "Refresh" button in Power BI 2 times.
I also confirmed that this only happens when connected to a specific perspective. When connected to "model" (i.e. the whole model), the error doesn't happen. For me, with 14 perspectives in my model, and model processing happening every 30 minutes, this is a big inconvenience for my analysts working in Excel and Power BI Desktop. A fix would be great. Please let me know if you have questions on the example, or need any more info from me.
Thanks!