If X and Y then count, If X and Z then count, If X and anything else then count etc.

I've been asked to show of constituents with tickets to X how many also attended Y. Also how many people have tickets to X that first came to us for Z. AND how many people have tickets to X that have been to anything other than Y and Z. I'm pretty sure I need some IF statements so I started just trying to figure out the first if X and Y and I keep producing a syntax error. Does anyone know how to get this to work?

SUM([Constituent ID] , IF (
[Max Production Season ID] = 3363 AND [Max Production Season ID] = 3380) , 1 , NULL)))

Parents
  • Hi Madeline,

    ...of constituents with tickets to X how many also attended Y.

    Yes, you have the right idea I think, just recommending a tweak to your formula that's more like

    SUM( [Constituent ID] , IF (
    ( [Total Ticket Count] , [Production Season ID = 3363] ) > 0 AND ( [Total Ticket Count] , [Production Season ID = 3380] ) > 0 , 1 , NULL)))

    Also how many people have tickets to X that first came to us for Z.

    There's a Constituent field for First Performance Name, so for this you could filter on Production Season = X and First Performance Name = Z

    AND how many people have tickets to X that have been to anything other than Y and Z. 

    SUM( [Constituent ID] , IF (
    ( [Total Ticket Count] , [Production Season ID = X] ) > 0 AND ( [Total Ticket Count] , [Production Season ID <> X or Y or Z] ) > 0 , 1 , NULL)))

Reply
  • Hi Madeline,

    ...of constituents with tickets to X how many also attended Y.

    Yes, you have the right idea I think, just recommending a tweak to your formula that's more like

    SUM( [Constituent ID] , IF (
    ( [Total Ticket Count] , [Production Season ID = 3363] ) > 0 AND ( [Total Ticket Count] , [Production Season ID = 3380] ) > 0 , 1 , NULL)))

    Also how many people have tickets to X that first came to us for Z.

    There's a Constituent field for First Performance Name, so for this you could filter on Production Season = X and First Performance Name = Z

    AND how many people have tickets to X that have been to anything other than Y and Z. 

    SUM( [Constituent ID] , IF (
    ( [Total Ticket Count] , [Production Season ID = X] ) > 0 AND ( [Total Ticket Count] , [Production Season ID <> X or Y or Z] ) > 0 , 1 , NULL)))

Children