6 Replies Latest reply on Apr 6, 2018 4:30 AM by Jim Dehner

# HOW: Calculated field - Sum based on max date

Hello Guys,

How to create a calculated field to sum the total revenue based on the maximum date the player was active. Hope someone could help me. See image below:

Thanks,

Ron

• ###### 1. Re: HOW: Calculated field - Sum based on max date

Hi ,

1) Create a calcuated field with max (date).

2)Place user name and max date in the sheet.

3) apply the filter with activity =yes in the filters card.

Best Regards,

Pavan

• ###### 2. Re: HOW: Calculated field - Sum based on max date

Hi,

i think,

if date = {max(date)} and with activity = 'yes' then sum(revenue) end

• ###### 3. Re: HOW: Calculated field - Sum based on max date

Good morning Ron

have you tried this to get the date

{fixed [username]: max(if [with activity]='YES' then [date] end )}

then just make your viz with the user name , the above calculation and Revenue

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

1 of 1 people found this helpful
• ###### 4. Re: HOW: Calculated field - Sum based on max date

There are many ways to do that. The one on the top of my head is:

Create a calculation that filters only the 'YES' activity, then "Add to Context" (NB.I get remove from context because I have already added it to context )

Then make another filter calculation that gets the max date.

I have attached the workbook

1 of 1 people found this helpful
• ###### 5. Re: HOW: Calculated field - Sum based on max date

Thank you guys.