# QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

## Help with Set Analysis - MAX

I have a table with MONTH, WEEK, DAY, PRODUCT and VALUE

I created a graph with dimension MONTH and PRODUCT, in expresson I need the VALUE of the biggest day of the month. (This value will be used to perform other account)

Problems encountered: When do the set analysis to catch the biggest day of the month, he does not respect the month dimension. Only respect when I selected.

Expression used: SUM({\$<DATA = {\$(=max(DATA))} >} VALOR)

I've tried to use AGGR, but had no success.

Thank you!

Tags (4)
1 Solution

Accepted Solutions

## Re: Help with Set Analysis - MAX

I solved the problem without using Set Analysis:

Sum( If( DATA = Aggr( Nodistinct Max( DATA ), MES, PRODUTO ), VALOR ) )

But if someone solve otherwise post here!

4 Replies

## Re: Help with Set Analysis - MAX

I solved the problem without using Set Analysis:

Sum( If( DATA = Aggr( Nodistinct Max( DATA ), MES, PRODUTO ), VALOR ) )

But if someone solve otherwise post here!

MVP

## Re: Help with Set Analysis - MAX

It seems to me that your maximum DATA per MES and PRODUTO might be static (not depending on selections), so you could add a flag to your data model (add these lines to your script):

MES,

PRODUTO,

max(DATA) as DATA,

1 as MAXDATAFLAG

Resident Calendario group by MES,PRODUTO;

and use this as expression in your chart with dimensions MES and PRODUTO:

=sum({<MAXDATAFLAG={1}>} VALOR)

Valued Contributor II

## Re: Help with Set Analysis - MAX

I think it's not possible to use Set Analysis in the way how the data looks as there is no unique connection between DATA and MES...and I think thats the problem here. Guess you have to script it differently (e.g. sript calendar-table and data-table separately) - then set analysis should be no problem.

Cheers

Daniel

## Re: Help with Set Analysis - MAX

That's a good idea, but I'll not solve my problem in script because I'll need another solutions to day, week, etc.