Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
trevorkr
New Contributor

how to calculate result difference from average previous 4 week same weekday results

Hello

I am trying to create a KPI that would show me the difference of filtered dates' result against the selected dates same weekdays results, looking back only 4 weeks (29 days) from filtered date.

For example, if I were to select 09.08.2018 from filter then the KPI would show me the percentage of how much different the selected dates result is compared to last 4 weeks same weekdays average result.

I tried to create an expression but it is not limiting the selection to 4 weeks.

=

(

Sum(

{

    $

    <

    TYPE={'10'},

    CurYTDFlag={1},

    PPR_TYPEID={'1','2','3'}

    >

    }

    RESULT

    ))

/

(Only(

Aggr( 

Sum

    (

    Total

    <

    WeekDay

   

    >

    RESULT)

    /

    count(

    Total

    <

    WeekDay

   

    >

    DISTINCT DB_KPI_DATE),

    WeekDay,

    DB_KPI_DATE)))

    -1

Can any one please help

1 Reply

Re: how to calculate result difference from average previous 4 week same weekday results

Are you doing this in a text box object? Also, it would be easier to make sense of this if you can share a sample app to look at...