Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

% change in Expression, Week over Week

Hello,

I am looking to write an expression in Qlikview showing a percent change comparing a week over week. I would like my weeks to be:

Current Week-1

and

Current Week-2

My current expression is

=Num(Sum(DISTINCT{1<Date = {"$(='>=' & Date(WeekStart(Max(Date),-1), 'M/D/YYYY') & '<=' & Date(WeekEnd(Max(Date),-1), 'M/D/YYYY'))"}, [Workload Type] = {'Referral'},[Channel]={'Self Service'}, Week, Year>} Count)
/
Num(Sum(DISTINCT{1<Date = {
"$(='>=' & Date(WeekStart(Max(Date), -2), 'M/D/YYYY') & '<=' & Date(WeekEnd(Max(Date), -2), 'M/D/YYYY'))"}, [Workload Type] = {'Referral'}, [Channel]={'Self Service'}, Week, Year>} Count)) - 1
,'
0.0%; 0.0%')


However, this is NOT following a percent change formula where: (New Value-Old Value)/Old Value.


Can you help me modify the current expression to meet our needs?

1 Reply
MVP
MVP

Re: % change in Expression, Week over Week

I think it's folloiwing

New / Old - 1

Isn't this mathematical equivalent to (New -  Old) / Old ?

Community Browser