The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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