9 Replies Latest reply: Feb 16, 2012 9:32 AM by Michiel van de Goor

# Select 1 value in listbox, display 5 in objects

Hi,

I need to be able to select 1 weeknumber and get also the 4 week previous weeks in my charts.

So: select in listbox week 5

Chart needs to display week 1 to 5

and also

an other chart only needs to show the selected week.

I tried with Getfieldselections and Get...selections-1 but that doens't work.

• ###### Select 1 value in listbox, display 5 in objects

Hi,

You this expression

Sum({<Week={">=\$(=Max(Week)-5)<=\$(=Max(Week))"}>} Sales)

Hope it helps

Celambarasan

• ###### Select 1 value in listbox, display 5 in objects

Celambarasan

Do you have an additional solution to use this in solution in this expression:

Sum (#Uren) / aggr(NODISTINCT Sum (#Uren), Week, REGIO)

The combination of calculations looks too much for set analysis.

Thanks

• ###### Select 1 value in listbox, display 5 in objects

Hi,

You mean with the week expression or this is new one?If so can you give me a brief about the expression usage?

Celambarasan

• ###### Select 1 value in listbox, display 5 in objects

The statement is like this now:

sum({<Week={">=\$(=Max(Week)-3)<=\$(=Max(Week))"}>} #Uren)

/

aggr(NODISTINCT Sum ({<Week={">=\$(=Max(Week)-3)<=\$(=Max(Week))"}>} #Uren), Week, REGIO)

It has to display 4 weeks with the percentage of the hours compared to the aggr calculation.

But only the 4 weeks based on 1 week selected.

thnx

• ###### Select 1 value in listbox, display 5 in objects

Hi,

Are you looking for this?

Sum ({<Week={">=\$(=Max(Week)-5)<=\$(=Max(Week))"} #Uren)/Sum(TOTAL<Week,REGIO> {<Week={">=\$(=Max(Week)-5)<=\$(=Max(Week))"}>} #Uren)

Celambarasan

• ###### Select 1 value in listbox, display 5 in objects

I'm looking for the idea but it doesn't give any results

I did try total but that gave me the wrong results, therefore I used aggr. Maybe aggr doesn't function with set analysis ...

• ###### Select 1 value in listbox, display 5 in objects

Hi,

If your getting wrong results then try with this approach.

=Sum ({<Week={">=\$(=Max(Week)-5)<=\$(=Max(Week))"} #Uren)/Sum(TOTAL {<Week={">=\$(=Max(Week)-5)<=\$(=Max(Week))"}>} aggr(NODISTINCT Sum (#Uren), Week, REGIO))

it helps you?

Celambarasan

• ###### Select 1 value in listbox, display 5 in objects

No, it doesnt give back multiple week.

The formula doesnt give any errors, it just doesnt calculate more than 1 week.

I look into it further,

• ###### Select 1 value in listbox, display 5 in objects

Hi,

Try the following expression

Sum({<Year=, Month=, Week=, DateFieldName={">=\$(=WeekStart(Max(DateFieldName), -4))<=\$(=Max(DateFieldName))"}>} Sales)

Hope this helps you.

Regards,

Jagan.