# Getting MaxOfflineDatasetSizeGB and Other Semantic Model Properties Set At Capacity Level

**Happy New Year !** 🎉

Just before the holidays last year [Michael Kovalsky](https://www.elegantbi.com/about) released [version 0.8.10](https://github.com/microsoft/semantic-link-labs/releases/tag/0.8.10) of Semantic Links Labs with a bunch of new helpful functions, among them `list_server_properties()` lists [properties](https://learn.microsoft.com/en-us/dotnet/api/microsoft.analysisservices.serverproperty?view=analysisservices-dotnet) of an Analysis Services instance. As you know, in Fabric, the workspace acts as a server which is tied to a capacity. You define these server properties in the [Capacity Settings](https://powerbi.microsoft.com/en-us/blog/five-new-power-bi-premium-capacity-settings-is-available-on-the-portal-preloaded-with-default-values-admin-can-review-and-override-the-defaults-with-their-preference-to-better-fence-their-capacity/). As far as I am aware, there wasn’t an API to get these capacity settings for audit/monitoring/debugging. With this new function, you can programmatically get the Semantic Model (i.e. Power BI workload) settings. `MaxOfflineDatasetSizeGB` is the most useful of these in case you encounter the dataset size limit error. Chris Webb has a [series of blogs](https://blog.crossjoin.co.uk/2024/05/05/power-bi-semantic-model-memory-errors-part-2-max-offline-semantic-model-size/) on this topic that dive deep into it ([Happy 20th birthday](https://blog.crossjoin.co.uk/2024/12/30/20th-blog-birthday/) to Chris’s blog!).

![](https://i0.wp.com/blog.crossjoin.co.uk/wp-content/uploads/2024/05/image-8.png?resize=525%2C508&ssl=1 align="left")

With Semantic Link Labs, you can get these settings. This is helpful in case you have multiple capacities with each having its own settings.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735847572988/c199a08e-ffd4-41fe-a4d8-6779a1458e0c.png align="center")

```python
##install version >= 0.8.10
#%pip install semantic-link-labs 
import sempy_labs as labs
workspace = "Sales Workspace"
(labs
    .list_server_properties(workspace = workspace)
    .assign(workspacename = workspace)
    .assign(capacity_sku = labs.list_capacities().query(f"Id == '{labs.get_capacity_id(workspace=workspace)}'").Sku.max())
)    
```

`MaxOfflineDatasetSizeGB` above is 0 which means the value is default based on the SKU shown below:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735846465030/270a76ea-61f8-480c-a86e-f33120c3f151.png align="center")

Check below references to learn more about these settings.

I can't think of an API that lets you change these settings programmatically. I'll update the post if I find one.

# References

* [How to configure workloads in Power BI Premium - Power BI | Microsoft Learn](https://learn.microsoft.com/en-us/power-bi/enterprise/service-admin-premium-workloads)
    
* [Analysis Services filestore properties | Microsoft Learn](https://learn.microsoft.com/en-us/analysis-services/server-properties/filestore-properties?view=asallproducts-allversions)
    
* [Power BI semantic model memory errors, part 2: Max Offline Semantic Model Size](https://blog.crossjoin.co.uk/2024/05/05/power-bi-semantic-model-memory-errors-part-2-max-offline-semantic-model-size/)
    
* [Choosing Azure Analysis Services for large datasets - SQLBI](https://www.sqlbi.com/blog/marco/2019/11/04/choosing-azure-analysis-services-for-large-datasets/)
