Hi Karthik
First of all sorry for the late response
Can we achieve the same using the following scenario? for instance, instead of calculating this drop percent in sql, can we calculate in the quicksight itself
drop percent : (sum({online_order}) - lag(sum({online_order}), [{order_date} ASC],1,[host]))/lag(sum({online_order}), [{order_date} ASC],1,[host])
Then i want find out the drop percent of current and previous month by applying it on your calculation right here
ifelse((lag(sum(droppercent), [{order_date} ASC], 1, [host]) < 0) AND (sum(droppercent) < 0), ‘2month continuous drop’, ‘1monthdrop’)
something like this
ifelse((sum({online_order}) - lag(sum({online_order}), [{order_date} ASC],1,[host]))/lag(sum({online_order}), [{order_date} ASC],1,[host]) < 0 AND lag((sum({online_order}) - lag(sum({online_order}), [{order_date} ASC],1,[host]))/lag(sum({online_order}), [{order_date} ASC],1,[host]), [{order_date} ASC],1,[host]) < 0,‘2monthdrop’,‘1month’)
is that even possible? again, appreciate your efforts karthik