Forum Discussion
How to Get Your Question Answered Quickly
Hello
I have used the following commands to call a data table in Power BI, but I have encountered problems, please help. Thank you for your cooperation
I just have to say that I want to use the current date in every run
= Sql.Database("MESODB", "CWLDATA", [Query="#(lf)select acccode,accname,SUM(ISNULL(DebitAmount,0)-ISNULL(CreditAmount,0)) Balance from Vmoein#(lf)where mesocomp = 'AZHD' and mesoyear = 1466 and (CAST(DateEn AS DATE) <= '"&DateTime.Date(DateTime.LocalNow())& "' OR period IS NULL or period = 0)#(lf)group by acccode ,accname#(lf)"])
Expression.Error: We cannot apply operator & to types Text and Date.
Details:
Operator=&
Left=
select acccode,accname,SUM(ISNULL(DebitAmount,0)-ISNULL(CreditAmount,0)) Balance from Vmoein
where mesocomp = 'AZHD' and mesoyear = 1466 and (CAST(DateEn AS DATE) <= '
Right=10/2/2022