Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I have found a custom query which will calculate no. of work days between days. The query works when I manually input dates in the function, however, I couldn't figure out how to use today's date in the query. Below is the function I created, clearly there is some syntax error in it.
Thanks!
Solved! Go to Solution.
@Anonymous , not completely sure. But try removing #date and related pranthesis on second argument.
@Anonymous
Try this
= Query1(#date(2021, 2, 15), DateTime.LocalNow())
Regards
Phil
Proud to be a Super User!
Thanks Phil. You are almost there. Still need to wrap DateTime.LocalNow() with DateTime.Date to get the correct format.
Thank you so much, it works now. So what does #date() mean here? A query?
Jean