Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am struggling to get my Prior YTD function working:
Sum({<Date={">=$(=Num(YearStart(Max(Date))-365))<=$(=Max(Date)-365)"}>} [Billing Quantity])
/Sum({<Date={">=$(=Num(YearStart(Max(Date))-365))<=$(=Max(Date)-365)"}>} #Units)
Please let me know what you think!
May be try
Sum({<Date={">=$(=YearStart(Max(Date),-1))<=$(=AddYears(Max(Date),-1))"}>} [Billing Quantity])
/Sum({<Date={">=$(=YearStart(Max(Date),-1))<=$(=AddYears(Max(Date),-1))"}>} #Units)
Hi,
You can set 2 variables
vPreStartDate = Date(YearStart(Max(addmonths(Date,-12))))
vPreEndDate = Date(addmonths(Max(Date),-12))
and make your expression as
Sum({<Date={">=$(vPreStartDate )<=$(vPreEndDate )"}>} [Billing Quantity]
/
Sum({<Date={">=$(vPreStartDate )<=$(vPreEndDate )"}>} [#Units])
Regards
Kamiel
You can try this? If Date field is in number format, Then below works
Sum({<Date={">=$(=Num(AddYears(Max(Date)),-1))<=$(=Max(Date))"}>} [Billing Quantity])
/
Sum({<Date={">=$(=Num(AddYears(Max(Date)),-1))<=$(=Max(Date))"}>} #Units)
If Date format is in Date Format, Then this?
Sum({<Date={">=$(=Date(AddYears(Max(Date)),-1))<=$(=Max(Date))"}>} [Billing Quantity])
/
Sum({<Date={">=$(=Date(AddYears(Max(Date)),-1))<=$(=Max(Date))"}>} #Units)
May be this
Sum({<Date={">=$(=Date(AddYears(Max(Date),-1)))<=$(=Max(Date))"}>} [Billing Quantity])
/
Sum({<Date={">=$(=Date(AddYears(Max(Date),-1)))<=$(=Max(Date))"}>} #Units)
May be this
=Sum({<Date={">=$(=YearStart(Max(Date),-1))<=$(=Date(Max(Date)),-365)"}>} [Billing Quantity])/
=Sum({<Date={">=$(=YearStart(Max(Date),-1))<=$(=Date(Max(Date)),-365)"}>} #Units)
May be try
Sum({<Date={">=$(=YearStart(Max(Date),-1))<=$(=AddYears(Max(Date),-1))"}>} [Billing Quantity])
/Sum({<Date={">=$(=YearStart(Max(Date),-1))<=$(=AddYears(Max(Date),-1))"}>} #Units)
Hi,
Try this one.This should work.
Sum({<Date={">=$(=Date(YearStart(max(Date-1),'MM/DD/YYYY')) <=$(=Date(AddYears(max(Date),-1),'MM/DD/YYYY'))"}>} [Billing Quantity])
/ Sum({<Date={">=$(=Date(YearStart(max(Date-1),'MM/DD/YYYY')) <=$(=Date(AddYears(max(Date),-1),'MM/DD/YYYY'))"}>} #Units)