Skip to main content
Microsoft Idea

Power BI

Needs Votes

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

Vote (38) 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

Eric Marshall 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

Geoff Richardson 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...