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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Vistazo
Regular Visitor

How do I remove "sum of" or " "count of" from value names?

Hi. I am looking for a way to remove "sum of" or "count of" from the titles in my Values column. I just want to see the title. There are over 50 entries, so I don't want to use the "rename for this visual" option. If there is a measure I can create to apply a fix to all values, can s.o. please show me how? Thanks.

6 REPLIES 6
Anonymous
Not applicable

Thank you @Ashish_Mathur and @samratpbi 

Hi, @Vistazo 

Bulk renaming of columns can currently be done with the help of external tools, in the example below I have a number of sum of xxx measures/columns, which we can do in bulk via the tabular editor:
Power BI :

vjianpengmsft_0-1721626733178.png

The C# script is as follows:

foreach (var measure in Model.AllMeasures)
{
    if (measure.Name.StartsWith("sum of ", StringComparison.OrdinalIgnoreCase))
    {
        measure.Name = measure.Name.Substring(7); // Remove the "sum of " prefix
    }
}

vjianpengmsft_1-1721626781583.png

When we run the script, all columns containing sum of are removed:

vjianpengmsft_2-1721626817677.png

Save your changes to view them in Power BI desktop:

vjianpengmsft_3-1721626858123.png

This method is suitable for bulk renaming. In your image, if it's the sum of ....prefix that results from the automatic aggregation of fields in a visual, and those prefixes are only valid in the visual, then we might have to modify the configuration file at the bottom of Power BI desktop if we want to change it. In fact, I don't recommend this workaround. If you modify the underlying files, it will affect the normal operation of your Power BI Desktop software, and we need to change all the configuration files that rely on this automatic aggregation feature, although it can achieve the purpose, but it takes much more effort than directly modifying the visual name and Power BI Service will not apply the current changes, because Power BI Service is a cloud service and we don't support modifying its configuration files.
At the moment, the method you have the option to do is: name them manually.
If you have the same column as I showed above, then you can use the method I provided above.

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

samratpbi
Super User
Super User

Hi, In the Build section, where you added your column, simply double click on the name and rename it to whatever name you want to have.

samratpbi_0-1721341432886.png

 

If this helps to resolve your problem, then please mark this as solution, Thanks!

Thanks but I don't understand. Here is my use case. I would like to remove the words "sum of" from EVERY VALUE, to leave only the value title. In this case, the month. I don't want to use the "rename for this visual" option as it takes too long. 

Values.jpg

Hi,

Furthermore, i see a problem with the layout/structure of your data.  You have a column for a month.  Instead all months should appear in a single column.  Please read up on/Google for "Unpivot Other Columns" in Power Query.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

If you use Sum or any aggregation, it will appear as the same until you rename the name. You may create measure with desired names.

Thanks

Thanks. I am new to Power BI. Can you tell me exactly what are the steps to create a measure to remove the words "sum of" from the entries in the values column. 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.