Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Remco
Contributor III
Contributor III

Using MAX in set analysis

Hi all,

I am trying to something apparently simple but cannot get it to work. I have a range of periods being 202001 the highest one and for each period I calculate the sum of petrol units divided by the sum of total units. Works perfect, no issue.

Now, what I also want to highlight is the is the out come of the last period. But here I am not able to get this done. When I do the next:

=SUM({<FUEL_PORTFOLIOPERIOD = {"=MAX(FUEL_PORTFOLIOPERIOD)"}>}FUEL_DIESEL) / SUM({<FUEL_PORTFOLIOPERIOD = {"=MAX(FUEL_PORTFOLIOPERIOD)"}>}FUEL_NUMCONTRACTS)

is does not work. When I change the "=MAX(FUEL_PORTFOLIOPERIOD)" for "202001" it works perfect. I also tried it making the Max(Fuel_portfolioPeriod) a variable that works correct but applying this variable in the Set Analysis, once again I get a wrong outcome. It just ignores the filter for FUEL_PORTFOLIOPERIOD.

 

What am I doing wrong?

Labels (1)
1 Solution

Accepted Solutions
DavidM
Partner - Creator II
Partner - Creator II

Like this:

{"$(=MAX(FUEL_PORTFOLIOPERIOD))"}>}

View solution in original post

2 Replies
DavidM
Partner - Creator II
Partner - Creator II

Like this:

{"$(=MAX(FUEL_PORTFOLIOPERIOD))"}>}

Remco
Contributor III
Contributor III
Author

It worked. Thanks. I thought I tried all the possibilities...