Forum Discussion
edit calculated or measure field
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.
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
- Anonymous6 years agoNot 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.
- Anonymous6 years agoNot 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())