Reputation: 1
I am trying to sum up a variable CMTAMT_OVRD
based on the Fake Date
variable to create a new variable. This is the formula I am using below.
CASE
WHEN Fake Date = 20181231 THEN SUM(CMTAMT_OVRD)
END
Fake Date
is a date field in YYYYMMDD
CMTAMT_OVRD
is a metric
I have already tried:
None of the above was working.
Failed to parse CASE statement. Is what it gives me every time or Invalid Formula.
Upvotes: 0
Views: 1351
Reputation: 1946
Try moving the aggregation outside of the case statement
sum(Case when Fake Date = 20181231 then CMTAMT_OVRD End)
Upvotes: 1