Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I'm sure it's something obvious but wanted to get a fresh set of eyes. I am getting the error:
Expression.Error: We cannot convert a value of type Function to type Type.
Details:
Value=[Function]
Type=[Type]
With the below code. I need to convert the Constituent Date Added field to en-GB. This particular formula has worked before so I'm not sure where I'm going wrong.
Any thoughts welcome.
let
Source = Csv.Document(File.Contents("Queries for Power BI\constituents.csv"),[Delimiter=",", Columns=10, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Constituent ID", type text}, {"Constituent Date Added", type text}, {"Deceased", type text}, {"Deceased Date", type text}, {"Gender", type text}, {"Key Indicator", type text}, {"System Record ID", Int64.Type}, {"Constituent Specific Custom Fields Mosaic Group Description", type text}, {"Constituent Specific Custom Fields Mosaic Type Description", Int64.Type}, {"Constituent Pays Tax?", type text}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Changed Type",{{"Constituent Date Added", each Date.From(DateTimeZone.From(_,"en-US"),"en-GB"), type date}})
in
#"Changed Type1"
Solved! Go to Solution.
It is caused by the following part
{"Constituent Date Added", each Date.From(DateTimeZone.From(_,"en-US"),"en-GB"), type date}
If you want to convert a column using a custom transformation function, you should use Table.TransformColumns instead. so replace Table.TransformColumnTypes with Table.TransformColumns.
Hi @sgetgood,
Thank you for reaching out in Microsoft Community Forum.
Thank you @Omid_Motamedise for the helpful response.
As suggested by Omid_Motamedise, I hope this information was helpful. Please let me know if you have any further questions or you'd like to discuss this further. If this answers your question, please "Accept as Solution" and give it a 'Kudos' so others can find it easily.
Please continue using Microsoft community forum.
Regards,
Pavan.
You are confusing Table.TransformColumns with Table.TransformColumnTypes.
#"Changed Type1" = Table.TransformColumns(...
It is caused by the following part
{"Constituent Date Added", each Date.From(DateTimeZone.From(_,"en-US"),"en-GB"), type date}
If you want to convert a column using a custom transformation function, you should use Table.TransformColumns instead. so replace Table.TransformColumnTypes with Table.TransformColumns.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 5 | |
| 5 | |
| 3 |