Forum Discussion
davidqsuires
9 years agoFrequent Visitor
DAX Formula Comparison
After recently building out our first SSAS Tabular data model, we ended up with 2 measures/methods to get my company's Fiscal Year to Date Sales. I did not build the initial formulas and i'm new to D...
- 9 years ago
In DAX, to calculate YTD for fiscal years, you can directly use TOTALYTD(), and specify a year_end_date argument in this function. For example:
=TOTALYTD(SUM(InternetSales_USD[SalesAmount_USD]),DateTime[DateKey], ALL(‘DateTime’), “6/30”)
It should perform much faster than your above formula. For more details, please see: TOTALYTD()
Regards,
Simon Hou
v-sihou-msft
9 years agoMicrosoft Employee
In DAX, to calculate YTD for fiscal years, you can directly use TOTALYTD(), and specify a year_end_date argument in this function. For example:
=TOTALYTD(SUM(InternetSales_USD[SalesAmount_USD]),DateTime[DateKey], ALL(‘DateTime’), “6/30”)
It should perform much faster than your above formula. For more details, please see: TOTALYTD()
Regards,
Simon Hou