Forum Discussion
timahenning2
2 years agoHelper II
PBIP - Getting 'Unable to open document' error when I try to open project
I worked on my project last night saved and closed. The next day I tried to open the project and received this error prompt: It seems like there is a trailing space introduced into a colu...
arrows20
2 years agoRegular Visitor
For others facing this issue, worked on small Tabular Editor 2 script to loop through all measures and removes last character if it happens to be whitespace. Saved me a lot of time if anyone needs it
foreach(var measure in Model.AllMeasures)
{
// Check if the measure name ends with a whitespace
if (measure.Name.EndsWith(" "))
{
// Remove the trailing whitespace and update the measure name
measure.Name = measure.Name.TrimEnd();
}
}