Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
I'm needing help with the following expression:
IF(
GetSelectedCount([Performance Date & Time]) = 1,
Sum(Tickets) / Sum(TOTAL <Venue, Show, PoH> Capacity),
IF(
GetSelectedCount([Performance Date & Time]) > 1,
Avg(Aggr(Sum(Tickets) / Sum(TOTAL <Venue, Show, PoH> Capacity), Venue, Show, PoH)),
Avg(Aggr(
IF(Count(Tickets) = 0, 0, Sum(Tickets) / Sum(TOTAL <Venue, Show, PoH> Capacity)),
Venue, Show, PoH, [Performance Date & Time]
))
)
)
My data model is based on performance sales data. So, if I have one performance selected, I want it to return the sold percentage compared to capacity, if more than one value is selected then the average of those selected, then if no value selected, then the average of of all performances in the data model even if they have zero tickets sold.
I though this would do it, but it doesn't work.
Help! And thank you...
It seems to me that the Avg expression would cover both the 1 selected and >1 selected cases.
Avg(Aggr(Sum(Tickets) / Sum(TOTAL <Venue, Show, PoH> Capacity), Venue, Show, PoH))
Would it cover the 0 selection case as well?
-Rob