2 Replies Latest reply: Sep 1, 2015 3:06 AM by Jan Ellers

# Set Analysis: Maximum of a value over two dimensions

Hi,

I have the following problem. I want to compare different values based on two different selections.

Both my bar charts have two dimensions: year and month

I want that both bar charts have the same scale, depending on the highest maximum of the selected month. E.g. In the pic you see June as the highest month. This should be the maximum value of my static scale.

So far I reached the following solution:

=if(sum({[CompareLeft]<[FilterArg] = {'ABC'}>} [Metric]) >= sum({[CompareRight] <[FilterArg] = {'ABC'}>} [Metric]),

sum({[CompareLeft]<[FilterArg] = {'ABC'}>} [Metric])+200,

sum({[CompareRight] <[FilterArg] = {'ABC'}>} [Metric])+200)

The problem here is, it summarizes all the timeframe and not just one month. Using Max instead of sum doesnt help neither. Do you have any ideas?

• ###### Re: Set Analysis: Maximum of a value over two dimensions

=rangemax(max(aggr(sum({[CompareLeft]<[FilterArg] = {'ABC'}>} [Metric]),Month)) , max(aggr(sum({[CompareRight] <[FilterArg] = {'ABC'}>} [Metric]),Month)) )

• ###### Re: Set Analysis: Maximum of a value over two dimensions

Magic, Thanks Gysbert!