This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
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 May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 3 | |
| 3 | |
| 3 |