You need an IF statement here instead of CASE statement.
IF running_sum[(earnings)] > 1000 THEN MIN([date])
ELSEIF running_sum[(earnings)] > 2000 THEN MIN([date])
HI Jiayi! Thanks for the reply. I am getting an error: Cannot mix aggregate and non-aggregate comparisons or results in if statement.
Hi! Please try this one:
IF running_sum[sum((earnings))] > 1000 THEN MIN([date])
ELSEIF running_sum[sum((earnings))] > 2000 THEN MIN([date])
Can you provide an example of what you're specifically trying to do with these dates? i.e. in what chart do you want to use these values? This is more complex than you will expect it to be.
Note in your previous formula you had an error in the running_sum formula - it should be running_sum(sum([field])). You have running_sum([field]). (Unless your field [earnings] is already pre-aggregated.)
I need something like:
APP_iD | Date_100 | Date_1000 | Date_10000
113 2015-01-01 2015-01-04 2015-01-09
and so on.
At this point even we are not entirely sure how the final visualization would be. It would be a time series chart for sure but we don't have more details.
The first step is to identify these dates.