Calculation Field in Wdata Query
Hi,
I am trying to add a calculation field in one of my wdata query to calculated the expected output as original column i.e Amount is taking Cumulative sum for month 2
For eg - for Month 2 the amount should be 1744679.75 but the amount field is giving values basis row label (1+2) = -10577949.27+(1744679,75) = -8833269.52
So how can i update my query in such as manner that if Month is 1 then month's 1 value else if Month is 2 then (Cumulative Sum of Month 2 Amount - Month's 1 value)
Thanks & Regards,
Dipti Khandelwal
-
Hi Dipti!
Great question. This was a bit of a head-scratcher, but I did ask our experts who recommended using a CASE WHEN statement. More info on this can be found here: https://prestodb.io/docs/current/functions/conditional.html
0サインインしてコメントを残してください。
コメント
1件のコメント