Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, Can someone help on this error
Expression.Error: We cannot apply field access to the type Function.
Details:
Value=[Function]
Key=Reference
Below is from advanced Editor
let
Source = Excel.Workbook(File.Contents("C:\Users\RNoori\OneDrive - Schlumberger\Business Insight\FP28 PBI Project\Realized-Unrealized\XR222.xlsx"), null, true),
XR222_Sheet = Source{[Item="XR222",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(XR222_Sheet, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"BaseAmount", type number}, {"AccountingPeriod", type text}, {"FiscalYear", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Date2", each [AccountingPeriod]&"/1/"&[FiscalYear]),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom",{{"Date2", type date}}),
#"Added Custom1" = Table.AddColumn(#"Changed Type1", "EOMONTH", each Date.EndOfMonth([Date2])),
#"Changed Type2" = Table.TransformColumnTypes(#"Added Custom1",{{"EOMONTH", type date}, {"System", type text}, {"Description", type text}, {"Reference", type text}}),
#"Added Custom2" = Table.AddColumn(#"Changed Type2", "Correct Curr", each if [System]="GL" then
Text.Start([Description],3) else
[CurrencyCode]),
#"Changed Type3" = Table.TransformColumnTypes(#"Added Custom2",{{"Reference", type text}}),
#"Added Custom3" = Table.AddColumn(#"Changed Type3", "Reference2", each if Text.Length[Reference] = 9 and
Text.StartsWith[Reference] ="FX"
then
Text.End([Reference],7)
else [Reference]),
Reference2 = #"Added Custom3"{0}[Reference2]
in
Reference2
Appreciate it.
I fixed it. It was syntax error.
if Text.Length([Reference]) = 9 and
Text.StartsWith([Reference], "FX")
then
Text.End([Reference],7)
else [Reference]
Thanks for posting the solutions. Kudos to you.
@ritanoori , have you added any new formula? , if yes share that
Is there a column which showing error as the data value, if yes, what is the column name
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
93 | |
82 | |
70 | |
64 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |