In a report i want to display 4 columns (id, last 30 days sales, last 60 days sales, last 90 days sales) along with this a date filter (order_date) .
When a user selects order_Date as 2024-11-10, so according to this date data should be displayed and again if a user select 2024-11-15 , according to this data data should be displayed…
I have a columns in the table id, order_Date, sales
Can you please help me to write the logics or formulas
you could try to use ifelse, datediff and sum to calculate it.
e.g “last 30 days sales”
get only relevant sales:
temp_sales30 = ifelse(datediff($date_parameter,order_date,"DD")<=30 and datediff($date_parameter,order_date,"DD")>=0 ,sales,0) dateDiff - Amazon QuickSight