cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kfransis
Regular Visitor

edit calculated or measure field

Hi, 

 

I am just wondering if there's a way to edit calculated/measured field in PowerBI?

 

Thanks

22 REPLIES 22
Jernej
Frequent Visitor

For everyone still having problem with this here is the solution to edit calculated column the same as you created it and not in the formula bar.

 

My Power BI is in Slovenian language, but dont let this bother you. When in query, choose the right table and select your calculated column, then click on the wheel icon usually representing "options" (see attached photo).

 

Hope this solves your problems, it certainly did mine.

 

edit query.PNG

 

Kind regards

Jernej

There is a difference between columns calculated in Power Query and calculated columns created in the actual model (once the data is loaded from Power Query) using DAX.

- Columns calculated in Power Query will appear as regular/normal columns in the field bucket in the model. You can edit the name of the column in the model/fields list, but in order to edit the calculations you need to go back into Power Query (and edit the M code or using the interface). Here is an example of a simple index column "calculated" in Power Query. and how it is seen in the field pane:

Index column in PQIndex column in PQ

 

Index column in the model fields' paneIndex column in the model fields' pane

 

- Calculated Columns are created in the model itself using DAX. These columns will not appear in Power Query. You edit them (both the name - by double clicking the name value - or the DAX - by simply selecting the column in the fields pane -no double click is necessary - and the DAX appears in the DAX formula bar where you write the measures etc. These columns are easily identifiable by a symbol next to the column name in the fields pane, under the table they were created in.

 

See this example of a calculated column created in the model using DAX, and notice the symbol next to the name.

Calc Column.JPG

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






I appreciate the explanation Paul but I still see no way of editing a calculated column. I'm hoping you have the patience to try one more explantion.  I am new to Power BI (but a long-time DB developer) and so far find the interface no less than punishing.  Wow!

 

I am using the Power BI desktop client.  I created a column to calculate the week-ending-Friday date on date field from a Microsoft Project dataset.  I did this via the Transform option and then the Custom Function button.  I don't know whether the code was DAX or M.

 

No edit or property options appear when right clicking on the column and no property pallete seems to exist.  There are gear icons in the Applied Steps area but the column name is not identified and it seems these steps are cleared in later sessions.

CustomFunction.PNG

Based on your explanation above I looked in the Model tab and while there is a properties pallette, there is no access to the original formula.
FieldProperties.PNG

Finally I looked in the Data tab but when clicking on the field no formula appears below the title bar.  Right clicking on the column allows navigation back to the Edit query but there again seems to be no access to edit the formula.

 

DataSet.PNG

 

 

 

Thanks 

 

Anonymous
Not applicable

I agree with the OP.

 

OP, if you can find the Advanced Editor, you can see the formula bar.

 

But there does not seem to be any way to edit a quick measure using the UI it was created with. And no reference to how the create dcode works, so it is currently impossible to maintain quick measures.

Anonymous
Not applicable

e.g. what's this mean?

 

bk_busowner = var logictest = COUNTROWS(filter(ALLSELECTED('excep1'[Selection]),'excep1'[Selection]="blank_BusinessOwner"))=1 return if(logictest, [_cntbo],BLANK())

Anonymous
Not applicable

I am double clicking on it, and single clicking, but no matter what the formula bar does not show up.

Egor
New Member

Hello. It is quite inconvenient to use formula bar for editing. 

 

When I create a new measure I open "New quick measure" where it is much more convenient to change my data just choosing from the list without thinking about how to write a correct query. Is it possible to open the same window for editing?

 

 

 

HansMostafavi
Advocate I
Advocate I

There is no drop down option for edit, you need to select the mesaure and use the formual bar to edit.

Hans said "select the column" then edit in "formula bar."

 

I dont see any formula bar when I select a calc'd column in data view.

 

what is wrong?

Double-clicking on the field (in the field list) will bring up the formula bar

I'm not seeing what you guys are seeing.  I double click on the filed and it just allows me to edit the name.  No foermula appears.  Surely this can be made a bit more intuitive.    Do I need to be in Modeling tab?  

Inside of the data model, there are three types of fields (columns): native (which you can only re-name), calculated columns (you can single click on a calculated column and look immediately below the ribbon to see the formula bar) and measures (here, also, a single click on a measure will expose the formula bar below the ribbon).

 

Hope that helps,

 

Tom

www.powerpivotpro.com

How's it going.

 

This might be an old post, but I cannot edit a calcuated column as described in the above post.

If I am in the "Data" view, with the fields on the right-side, when I double-click a calculated column,

it gives me the ability to "Re-Name" the calculated column. If I click on a measure, the formula bar populates with

the code to create that measure. However, when clicking on any calculated column, my formula bar is blank and shaded out.

 

The only way I can edit or see what makes a calculated column, is to "Edit Queries", then find the line in the "Query Settings" for that table, where PowerBI recorded me creating the calculated column in the first place.

 

I just updated my PowerBI tool to the latest version - 2.69.5467 64-Bit (May-2019)

 

Let me know if this is a functionality that should be in the application and is not.

 

Thanks,

PR

Yes, this is a weakness that needs to be improved. 

 

The only way to see or edit the formula for a formulated column is in Advanced Query Editor. 

Mykhael
Kudo Kingpin
Kudo Kingpin

Hello @kfransis,

 

What do you mean about "a way to edit calculated/measured fiel"? I need more information, Can you send me a screenshot about that? Please. That will be very helpful.

 

Best

Hi @Mykhael,

 

Thanks for the response. 

 

So I added a new column called "11 week total" that is calculated based on the total of Week1+Week2+Week3+...+Week11 value. (see attached image) It works pretty well but then the next time when I want to update the calculation by adding/removing the column from that original formula, I can't seem to do that. The only option for me is either Rename, Delete or Hide. There's no option for edit.

 

Hope that clarify my question.

 

Thanks

 

calculated-field.png

 

You should see something like this (three dots) in the right area, once you click on those, a menu will be displayed, over there you can select DELETE. If doesnt work I strongly recommend you to reinstall Power BI desktop, maybe is out of date. Let me know if it works please.

 

Best

 

1.png

@Mykhael,

 

Thanks for the quick response. Having said that, I am not trying to delete the custom column. What I am trying to do is to edit them.

 

Kamiel

 

 

Hello @kfransis

 

I am sorry about the misunderstanding. I share this screenshot, as you can see it's very easy. But If this doesnt work for you, let me know, I will help you on that, I promise.

Best1.png

Thanks @Mykhael

Helpful resources

Announcements
August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 24 without aka link and time 768x460.jpg

Ted's Dev Camp - July 28, 2022

Watch Session 24 of Ted's Dev Camp along with past sessions!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors