6 Replies Latest reply on Aug 2, 2018 5:12 AM by Zhouyi Zhang

# Last week's CVR Calculation

Hi there. I'm trying to figure out how to get "Last week's CVR" visualised in text but so far no luck... hopefully someone could shed some light on.

I used this to get last week's sales and it works but if I replace [Revenue] with [CVR], which is "sum(transactions)/sum(sessions)"  then it fails as it mixes "aggregate and non-aggregate"...

>Last week's sales

LOOKUP(WINDOW_SUM(SUM(IIF([Last Week?],[Revenue],NULL))),0)

>Last week's CVR

LOOKUP(WINDOW_AVG(AVG(IIF([Last Week?],[CVR],NULL))),0)

Being still a learner, I'd appreciate anyone's guidance on this.

Thanks!

Yuji

• ###### 1. Re: Last week's CVR Calculation

Hi, Yuji

Try this

LOOKUP(WINDOW_SUM(SUM(IIF([Last Week?],[transactions],NULL))),0)

/

LOOKUP(WINDOW_SUM(SUM(IIF([Last Week?],[sessions],NULL))),0)

ZZ

1 of 1 people found this helpful
• ###### 2. Re: Last week's CVR Calculation

Hi ZZ,

Thanks a lot for such a speedy help! Your suggestion did work beautifully!

Thanks again.

Yuji

• ###### 3. Re: Last week's CVR Calculation

No worries, I am glad to help.

Can you also mark my answer as correct to close the thread?

ZZ

• ###### 4. Re: Last week's CVR Calculation

Hi ZZ, sorry I'm a newbie.. I can't seem to find how to mark your answer correct... could you point me where it is?

Under "actions" drop down, there's no actions available.

thanx!

Yuji

• ###### 5. Re: Last week's CVR Calculation

HI ZZ, i just figured out how to mark it resolved and ur answer correct. Thanx!

• ###### 6. Re: Last week's CVR Calculation

thx,

ZZ