Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have created a Data definition using .Net TOM library and published the dataset to a workspace using XMLA end point. I have created a measure using the format stated below:
public int AddMeasures(IEnumerable<MeasureInfo> measures)
#####---------------------
{
var table = EnsureTableExists();
int count = 0;
foreach (var item in measures)
{
if (!table.Measures.ContainsName(item.Name))
{
var newMeasure = new Measure
{
Name = item.Name,
Expression = DaxExpression, // Dax expression
IsHidden = !item.Visible,
DisplayFolder = item.FolderPath
};
table.Measures.Add(newMeasure);
count++;
}
}
return count;
} --------#####
But when i connect to the published semantic model in Power BI Desktop, I am unable to edit the measures; by that I mean, when one clicks on the measure you get to see the underlying DAX Expression, which user can edit/delete it if needed. This is missing for the measures CREATED via XMLA end point. Is this how it is supposed to be , are the measures created via XMLA end point, read only ?
Solved! Go to Solution.
Hi @bhavana_dfz,
Thank you for reaching out to the Microsoft Fabric Forum Community.
When you create and publish measures using the .NET TOM library via the XMLA endpoint, those measures become part of a dataset hosted in the Power BI Service. When you connect to that dataset in Power BI Desktop (through a live connection), Power BI treats it as a "read only" model. That’s why you can’t click on those measures to see or edit the DAX expressions it’s not just your code; it’s how Power BI handles all published datasets.
To make changes to those measures, you’ll need to use tools that are designed to work with published models, such as Tabular Editor or by updating them through your TOM code again. Power BI Desktop can’t edit datasets once they’re published it’s only for building or viewing. If you want to freely edit measures, do it before publishing, or use external tools that support the XMLA endpoint.
Best regards,
Prasanna Kumar
Thank you for answering my question @v-pgoloju . I have a follow up.
Why is viewing and editing measures not an issue when semantic models are published via power bi desktop? I can connect 'live' to those publilshed semantic models from my desktop again and view measures after they are published. How are models published via XMLA end point different from those published via desktop ?
Hi @bhavana_dfz,
Thank you for reaching out to the Microsoft Fabric Forum Community.
When you create and publish measures using the .NET TOM library via the XMLA endpoint, those measures become part of a dataset hosted in the Power BI Service. When you connect to that dataset in Power BI Desktop (through a live connection), Power BI treats it as a "read only" model. That’s why you can’t click on those measures to see or edit the DAX expressions it’s not just your code; it’s how Power BI handles all published datasets.
To make changes to those measures, you’ll need to use tools that are designed to work with published models, such as Tabular Editor or by updating them through your TOM code again. Power BI Desktop can’t edit datasets once they’re published it’s only for building or viewing. If you want to freely edit measures, do it before publishing, or use external tools that support the XMLA endpoint.
Best regards,
Prasanna Kumar
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 56 | |
| 55 | |
| 31 | |
| 17 | |
| 14 |