3 Replies Latest reply: Oct 26, 2010 10:33 AM by Roland Kunle

# formula to YTD Analisys

hey Qliks...

i've a table like this, but i need to complete the VAR WTD column:

the excel formula is : (TRP´s of the selected week)/ (TRP's of before week) - 1

example: if i selected 6 in Semana's table then:

(TRP´s of 6th week) / (TRP's 5th week) - 1

in excel, i obtain this value, but in QV how can i do this?.

thousand tnxs!!!

• ###### formula to YTD Analisys

If you have QlikView 8.5 and up you can use set analysis to make a formula like below:

sum(TRPs) / sum({\$<Semana={\$(=max(Semana)-1)}>} TRPs) - 1

sum(TRPs) will return the sum of the week selected and sum({\$<Semana={\$(=max(Semana)-1)}>} TRPs) will return the sum of the week before the week selected.

Regards.

• ###### formula to YTD Analisys

thnx a lot Karl but i've a last question...

I put this formula in "properties", "expressions" in the definition part???

Regards....

JA

• ###### formula to YTD Analisys

Hi Jorge,

Karl isn't online. It is correct. Properties --> expression --> check your expression ---> definion

Regards, Roland