Vizlib Home Try Vizlib
Welcome
Login
Answered

Pivot Table % range changes when Period is selected

Hi all,


Hoping you can give me a hand with this issue.


Trying to fix up an issue with the % Above and % Below Cost that changes when a Period is selected, because the Average Cost changes between when a Period is selected or not, as it takes the average for the year when no periods are selected instead of taking the average cost for the month.


The expression used is as follow:


Sum({<Contribution_per_Ticket={">=$(=Avg(Cost))"}>} Ticket)

/

Sum(Ticket)


Expression results:

  • When No periods are selected:

image


  • When a Period is selected:

image




image

image


  • Hi Fabien |
    When you use set analysis the filter is calculated on app level,
    Set analysis is the equivalent of making a selection in the app, hence you get one value for all cells
    If you want the avg per period, you can look at something like this

    Sum(if(Contribution_per_Ticket>=Avg(total<Period> Cost), Ticket))

    /

    Sum(Ticket)

  • Thanks for that Liron but there is an error in the expression as nested aggregations are not allowed.

Login to post a comment