Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
infosense_devel
Creator II
Creator II

First Day of Week in Pivot Table.

Hello,

          i have have created pivot table table as below.

         

   

Week DayNAMEVAUS_OUVCHN_OUVDX_OUVEIT_OUVESA_UOVFSA_OUVGMBH_OUVHK_OUVLTD_OU
6-Jun-16 936973744799222609571340357418872963584117916016083596716710382340

     note:- i have selected "6-Jun-16" to explain issue.


i have two dimensions "Week Day" and "NAME".

i have used below expr:-

Week Day =>     " =Date(Floor(weekend(Common_Date)+1),'DD-MMM-YYYY')"

Amount =>      "=sum({<REC_TYPE={BacklogRecHistory},Accounts=,BACKLOG_SBU-={MS},NAME-={'VCAN_OU','VUSA_OU'},Common_Month=>}(BACKLOG_AMT + PAST_DUE_AMT))"

i found that Amount is not correct, it is not showing amount for only "6-Jun-16". it doing sum for that week.

i have added common_date to above table.

   

Week DayCommon_DateNAMEVAUS_OUVCHN_OUVDX_OUVEIT_OUVESA_UOVFSA_OUVGMBH_OUVHK_OUVLTD_OU
6-Jun-1630/05/2016 13862610863322511911887809268767186868222958397793071528331
31/05/2016 15093710877452306531899961246526685683322890937670141513315
1/6/2016 11993710865723707361931176239226683367323020648787181480480
2/6/2016 13254010707853595801924840286519682114922536308835801454547
3/6/2016 12623610410533495991922542283487981977722894318859761454533
4/6/2016 12623610410533495991922542283487981977722894318859761454533
5/6/2016 14246110344523495991914704279280482128722965968865951496603



Desire result :-

Table should display week start date and amount for that particular date only.

1 Solution

Accepted Solutions
sunny_talwar

Why don't you create a flag for WeekStart dates in the script

If(Floor(WeekEnd(Common_Date)+1) = Common_Date, 1, 0) as Flag

and then use the set analysis in your expression:

{<Flag = {1}>}

View solution in original post

2 Replies
sunny_talwar

Why don't you create a flag for WeekStart dates in the script

If(Floor(WeekEnd(Common_Date)+1) = Common_Date, 1, 0) as Flag

and then use the set analysis in your expression:

{<Flag = {1}>}

sunny_talwar

May be like this:

=Sum({<REC_TYPE={BacklogRecHistory}, Accounts=, BACKLOG_SBU-={MS}, NAME-={'VCAN_OU','VUSA_OU'}, Common_Month=, Flag = {1}>}(BACKLOG_AMT + PAST_DUE_AMT))