Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bhavana_dfz
Frequent Visitor

RE: Measures created using XMLA end point

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 ? 

1 ACCEPTED SOLUTION
v-pgoloju
Community Support
Community Support

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

View solution in original post

2 REPLIES 2
bhavana_dfz
Frequent Visitor

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 ?

v-pgoloju
Community Support
Community Support

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.