Skip to main content

Power BI

New

Allow us to set the data type in the Add Custom Column PowerQuery dialog

Vote (37) Share
edh's profile image

edh on 25 Feb 2017 03:27:40

It would be nice if we could set the data type in the Add Custom Column dialog box for the function we are writing insetead of having to do it manually in the formula bar, or adding an extra step to do it in the Applied Steps.

For example:
Table.AddColumn(#"Added Credits", "CalcEndBalance", each [beg_bal_1]+[Debits]-[Credits])

That evaluates to an ANY data type. I can manually edit the formula bar so it is:
Table.AddColumn(#"Added Credits", "CalcEndBalance", each ([beg_bal_1]+[Debits]-[Credits]), type number)

so now it is changed to a number in the same step. The problem is 1) that is manual and 2) you can no longer edit the function with the Add Custom Column dialog box. The gear icon is removed from the step.

Comments (2)
edh's profile image Profile Picture

7da7af1f 442d-4da1-b85b-fb29f8527054 on 16 Aug 2020 04:15:42

RE: Allow us to set the data type in the Add Custom Column PowerQuery dialog

This is a must have given how often custom columns are created in Power Query.
At the moment, you have to create the column, then change the type by either adding another “Changed Type” step or add a type argument to the create column step in the formula bar. Making any subsequent changes to the custom column formula via the user interface currently clears any type argument made in the formula bar which is very annoying.

edh's profile image Profile Picture

a2ec1974 a898-4655-b473-8712bcfa392c on 16 Aug 2020 04:14:58

RE: Allow us to set the data type in the Add Custom Column PowerQuery dialog

...and while you're reworking the Custom Column dialog, why not resolve other ideas out there that are asking for the dialog to be resizeable...