Forum Discussion

davidqsuires's avatar
davidqsuires
Frequent Visitor
9 years ago
Solved

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...
  • v-sihou-msft's avatar
    9 years ago

    davidqsuires

     

    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