Forum Discussion
Error pulling data form another semantic model
- 2 months ago
Hi masplin ,
As a next step, could you please perform the following test?
Create a new report page in Model 2.
Add a table visual containing only a simple text column from Model 1.
If possible, temporarily remove or disable any calculation groups that may be impacting the query.
Republish the report and verify whether the issue persists in the Power BI Service.If the same error occurs with a basic text column and no calculation group involvement, this would help confirm that the issue is not related to the refresh date logic itself but rather to the cross-semantic model query execution.
In that case, we would recommend opening a Microsoft Support ticket and providing the Activity ID, Correlation ID, Request ID, and timestamp from the error message. These details can be used to review the backend logs and identify the exact point of failure during query execution.
Please let us know the results of the above test, and we'll be happy to continue investigating.
Thank you.
Hi masplin
I think this OnPremiseServiceException error happens because your second semantic model is configured with a local timezone format (like British Summer Time) that conflicts with the strict cloud format requirements when passed between chained datasets. When you pull a dynamic refresh timestamp locally in Power BI Desktop, the engine handles the data type flexibly, but once published, the Power BI Service requires datetime strings coming from a cross-dataset query to be explicitly locked down to an absolute ISO standard or UTC format to prevent the backend gateway layer from crashing.
To fix this, go back into your first semantic model's Power Query editor where the refresh time is generated, and explicitly convert that timestamp column to text or force it to UTC using DateTimeZone.ToUtc(DateTimeZone.LocalNow()). If you convert it to a plain text string before passing it to the second model, it completely bypasses the cloud timezone validation check, which will resolve the error instantly on the Service without breaking any of your other cross-model table links.
Well that didnt work. I created a seperate table so I could format the date as text as you suggested. I'm actually picking up the modified date of a set of excel spreadhseets.
so in my source model i just have
let
Source = SharePoint.Files("https://consolxxxxthcareltd.sharepoint.com/sites/PowerBIReporting/",[ApiVersion=15]),
#"Filtered Rows" = Table.SelectRows(Source, each ([Folder Path] = "https://consolidatedhealthcareltd.sharepoint.com/sites/PowerBIReporting/Shared Documents/Trinity New Model/Date Exports/Transaction Data/")),
#"Sorted Rows" = Table.Sort(#"Filtered Rows",{{"Date modified", Order.Descending}}),
#"Kept First Rows" = Table.FirstN(#"Sorted Rows",1),
#"Removed Other Columns" = Table.SelectColumns(#"Kept First Rows",{"Date modified"}),
#"Changed Type2" = Table.TransformColumnTypes(#"Removed Other Columns",{{"Date modified", type datetime}}),
#"Changed Type3" = Table.TransformColumnTypes(#"Changed Type2",{{"Date modified", type text}})
in
#"Changed Type3"this which sorts the files to get the latest one then converts the modified date to text.
I deleted the previous table from my second model and just connected to this new table. I used VALUES to turn the column data into a measure so i could add it to the multi card.
Exactly same error. Also there is a pink ribbon saying "an error occured in Power BI Preium backend" but we dont have power bi premium?
Everything else seems to be fine and think I am connected to the other table coming from the first model no problem. Its just this date that is the issue.
Wierdly I got a blank pbix and connected to the first model. No problem adding the date as a column or a measure. no errors. So the issue is some conflict between the data in the second model and having connection to the first model. As I say I have an existing connection to the first model pulling in a whole table of data for comparison and that seems to be fine.
Really stumped