Forum Discussion

admin11's avatar
admin11
Icon for Memorable Member rankMemorable Member
5 years ago
Solved

which YTD expression is better ?

Hi All

 

Below both expression work fine :-

 

_YTD_REV_ROBERT =
var _max = today()
return
calculate(TOTALYTD([AMOUNT],'Date'[Date]),GL[1_REV] = "REV",filter('Date','Date'[Date]<=_max))
 
_YTD REV_AMIT = CALCULATE(CALCULATE(GL[AMOUNT],DATESYTD('Date'[Date],"12/31")), GL[1_REV] = "REV")
 
May i know you prefer to use which one and why ?
 
Paul Yeo
  • admin11 , ideally the first one should display data till today only.

    With TOTALYTD not need to calculate.

    Both functions are almost the same.

     

    I prefer to use calculate to I use DATESYTD more often

1 Reply

  • admin11 , ideally the first one should display data till today only.

    With TOTALYTD not need to calculate.

    Both functions are almost the same.

     

    I prefer to use calculate to I use DATESYTD more often