4 Replies Latest reply: Nov 29, 2013 5:34 AM by christian juillard

# Set analysis explanations

Hi guys,

I need some clues about set analysis. Something i must have forgotten

1.

this is the result of a year and 2 months selection using set analysis

Sum ({<Dte.YearMonth={\$(=max(Dte.YearMonth))}>} Rev.[Amount])

according to this model

2. I'd like to understand I can't use this

Sum ({<Dte.YearMonth={\$(<=max(Dte.YearMonth))}>} [Rev.Amount])   (note <=)  to have a YTD result with 1 year and 1 month selected?

The following set works with RevYear and Rev.month

sum ({<[Rev.Year]={'\$(vMaxYear)'}, [Rev.Month]={'<=\$(vMaxMonthNum)'}, Dte.Year=, Dte.Month=>} [Rev..Amount])

But why not with Dte.Year and Dte.month

Thnak you

Chris

• ###### Re: Set analysis explanations

try this one :

Sum ({<Dte.YearMonth={'<=\$(=max(Dte.YearMonth))'}>} [Rev.Amount])

Dirk

• ###### Re: Set analysis explanations

You´re misplacing the <=

The correct would be

Sum ({<Dte.YearMonth={<=\$(=max(Dte.YearMonth))}>} [Rev.Amount])

• ###### Re: Set analysis explanations

Be careful that Max() return a not formatted number, so you should format it too

Sum ({<Dte.YearMonth={<=\$(=date(max(Dte.YearMonth),'MM/DD/YYYY'))}>} [Rev.Amount])

• ###### Re: Set analysis explanations

Hi Guys

thank you for your answers.

Jus a metter of a very little '=' sign

have a nice day

Chris