Skip to main content

Hi, 

I'd be grateful if someone could help point me to how to solve this problem? I'm trying to calculate the variable revenue generated by the number of people who register for an event, using a parameter to input a hypothetical number of registrants. 

Different types of registrants get charge different amounts  - so for example, a 'Member Participant' might get charged $750 to attend, a guest might get charged $850. 

At this stage i want to calculate what the revenue from x numbers of 'Member participants'  would be. I've tried all sorts of variations of the attached formula, adding in ATTR, averaging the 'Amount' and using a calculated field called 'Average Amount' in place of 'Amount, but it keeps saying it cannot mix aggregate and non-aggregates. 

Currently the formula is summing all the $750's that have actually registered, and then multiplying by the 'Member Attendees Select' parameter, whereas i want it to simply take the $750 and multiply it by the parameter.  

Any guidance would be greatly appreciated. I am going cross-eyed from having spent so long trying all sorts of permutations, and ways around the problem. 

Sincerely, 

Andy 

Cannot mix aggregate and non-aggregate in if statement

 

 

 

#Tableau  #Tableau Desktop & Web Authoring

2 answers
  1. Jun 2, 12:07 AM

    @Andy Johnston I would probably use MIN() in your case

    { FIXED [Event Name]:

    IF MIN([attendee_type])="Member Participant" THEN MIN([amount])* [Member Attendees Select] END }

    Not sure how the data is structured, but I'd probably start with that.  As example using Sample Superstore data:I would probably use MIN() in your case{ FIXED [Event Name]:IF MIN([attendee_type])=

     

     

     

0/9000