Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
I've found some code to pull 3-years worth of data dynamically. It is giving me a 'Token Comma expected' error on #"Filtered Rows" however. Would you please provide any thoughts or suggestions on how to troubleshoot the following code? Thank you in advance!
let Source = Salesforce.Data(), #"Year" = Date.Year(DateTime.LocalNow())-3, Opportunity1 = Source{[Name="Opportunity"]}[Data] #"Filtered Rows" = Table.SelectRows(Opportunity1, each Date.Year([LastModifiedDate]) >= #"Year") in #"Filtered Rows
Solved! Go to Solution.
In "M" you need "," at end of each line between 'let' & 'in' except at last line before 'in'. (Excluding line continuation)
Looks like you are missing "," at Opportunity1 line.
Hi @shamwoo,
Please update your code as below and try again.
let Source = Salesforce.Data(), #"Year" = Date.Year(DateTime.LocalNow())-3, Opportunity1 = Source{[Name="Opportunity"]}[Data], #"Filtered Rows" = Table.SelectRows(Opportunity1, each Date.Year([LastModifiedDate]) >= #"Year") in #"Filtered Rows
Regards,
Frank
Hi @shamwoo,
Please update your code as below and try again.
let Source = Salesforce.Data(), #"Year" = Date.Year(DateTime.LocalNow())-3, Opportunity1 = Source{[Name="Opportunity"]}[Data], #"Filtered Rows" = Table.SelectRows(Opportunity1, each Date.Year([LastModifiedDate]) >= #"Year") in #"Filtered Rows
Regards,
Frank
Hi @shamwoo,
Does that make sense? If so, kindly mark the answer as solution to close the case.
Regards,
Frank
In "M" you need "," at end of each line between 'let' & 'in' except at last line before 'in'. (Excluding line continuation)
Looks like you are missing "," at Opportunity1 line.
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |