Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
OK, so I have a C# WPF external tool built for Power BI. Basically, a metadata editor. Everything works editing the metadata except the FormatString for Columns and Measures. But here's the thing, if I set a custom format string for a column or measure, the custom format string is changed such that if I am in Power BI Desktop and change the Format from something like General to Custom, then the custom format string is there and works. But, Power BI Desktop does not automatically recognize that the format should be Custom.
Even weirder. If I change a DateTime column from Short Date to Long Date, I can see that the change happened in Tabular Editor but Power BI Desktop continues to display Short Date instead of Long Date.
Was curious if anyone knew of why FormatString is acting like this. Again, everything else works, I can hide tables/columns/measures, set the Description and even change the home tables of measures. But FormatString is just acting weird.
Solved! Go to Solution.
OK, so after struggling with this most of yesterday and today, I finally figured it out. You have to remove the Format annotation from the object to force Power BI Desktop to update. So:
metadataobject.Annotations.Remove("Format")
OK, so after struggling with this most of yesterday and today, I finally figured it out. You have to remove the Format annotation from the object to force Power BI Desktop to update. So:
metadataobject.Annotations.Remove("Format")
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |