Forum Discussion
1 arguments were passed to a function which expects 3. Query step not working for if statement.
- 8 years ago
Hi przos,
The #date("2018,12,19") should be #date(2018,12,19). The double quotes make the three parameters as one. Please check it and try again.
Best Regards,
Dale
Hi,
A while ago my PowerBI query stopped working.
One of our mechanism contains solution where new Custom column is being created. It takes current date and then displays Sprint Number (2 weeks range for a sprint). Until recently, this worked all right, but now I get a following message:
Expression.Error: 1 arguments were passed to a function which expects 3.
Details:
Pattern=
Arguments=List
The code:
= if (DateTime.Date(DateTime.LocalNow())<=#date(2018,1,2)) then "Sprint from 2017" else
*lots of ifs based like the one below here from S1 to S49
if (DateTime.Date(DateTime.LocalNow())>=#date("2018,12,19") and DateTime.Date(DateTime.LocalNow())<=#date("2019,1,1")) then "Sprint 51"
else ""
Solution does not pick up the data through/from the gateway and gets it from OFeed. Until this step (Custom Column) all works well. Has Microsoft changed anything here recently?
Anyone could help me with defining what is wrong or how to correct it?