Forum Discussion

kfransis's avatar
kfransis
Regular Visitor
10 years ago

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

  • Egor's avatar
    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?

     

     

     

  • 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

    • kfransis's avatar
      kfransis
      Regular Visitor

      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

       

       

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

    • dpenny's avatar
      dpenny
      Icon for Helper II rankHelper II

      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?

      • BaldEagle's avatar
        BaldEagle
        New Member

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

  • Anonymous's avatar
    Anonymous
    Not applicable

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

  • Jernej's avatar
    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.

     

     

    Kind regards

    Jernej

    • PaulDBrown's avatar
      PaulDBrown
      Icon for Community Champion rankCommunity Champion

      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 PQ

       

      Index 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.

       

      • Kazoo60's avatar
        Kazoo60
        Frequent Visitor

        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.

        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.

        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.

         

         

         

         

        Thanks