Past day:
zn(LOOKUP(AVG(IF [Date] >= ([End Date] -1) then [Sales] END),0))
Past month:
zn(LOOKUP(AVG(IF [Date] >= ([End Date] -30) then [Sales] END),0))
Past Week:
zn(LOOKUP(AVG(IF [Date] >= ([End Date] -7) then [Sales] END),0))
90 days avg:
IF [Date] >= ([End Date] -90) then [Sales] END
End date is a parameter and Date is coming from the source like Order date in Sample Superstore.
Nice post, Thanks for sharing
ReplyDeleteTableau Online Course
I have found great and massive information. Thanks for sharing
ReplyDeleteTableau Online Training
Tableau Online Course