SQL Server, How to Calculate Year-To-Date Total Revenue from the beginner of the year up to now
I am trying to reproduce a Power BI measure into SQL. I calculated on Power BI the YTD Revenue like so:
YTD Revenue = CALCULATE([Total Revenue], DATESYTD(‘Calendar'[date]))