Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Average date differnce in Pivot table

Hi friends ,

I have data in below format .I want to display average date difference in pivot table

Previous StageCurrent StagePrevious DateCurrent Date
S1S2Null9/11/2017
S2S39/11/20179/12/2017
S3S49/12/20179/13/2017
S4S59/13/20179/14/2017
S4S59/6/20179/7/2017
S5S69/7/20179/7/2017
S6S79/7/20179/7/2017
S7S89/7/20179/7/2017
S5S49/5/20179/5/2017

Expected output format

  

stagess1s2S3S4S5S6S7S8
s1xxxxxxxx
S2xxxxxxxx
S3xxxxxxxx
S4xxxxxxxx
S5xxxxxxxx
S6xxxxxxxx
S7xxxxxxxx
8 Replies
sunny_talwar

What are the x's for? what do they mean?

Anonymous
Not applicable
Author

HI Sunny,Sorry for in complete description .'X' represents Average date difference from stage to stage

changes in the stages are  an S1 should only go to an S2, and so on.

  • S1 -> S2
  • S2 -> S3
  • ...
  • S8 ->

but we still need to determine the average date diff for a movement from S1->S3 S1_->S4 ........

Anil_Babu_Samineni

May be these?

Avg(Stage)-Below(Avg(Stage))

Still not sure, your intention here

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
effinty2112
Master
Master

Hi Krishna,

Maybe this pivot table?

Previous Stage Current Stage S2S3S4S5S6S7S8
S1  
S2 1  
S3 1  
S4 1  
S5 0 0  
S6 0 
S7 0

Expression: Avg([Current Date]-[Previous Date])

Regards

Andrew

Anonymous
Not applicable
Author

Hi Andrew,

thanks for your reply but this didn't solve my problem.I want to display the date diff averages for each and every stage .

From

s1 -> s2

s1 -> s3

s1 -> s4

s1 -> s5

....->  s8

but we get the data in linear fashion

Previous StageCurrent StagePrevious DateCurrent Date
S1S2Null9/11/2017
S2S39/11/20179/12/2017
S3S49/12/20179/13/2017
S4S59/13/2017

9/14/2017

S2S39/08/20179/10/2017
Anonymous
Not applicable
Author

Hi Anil,

I am trying to display average date difference from stage to stage

Previous StageCurrent StagePrevious DateCurrent Date
S1S2Null9/11/2017
S2S39/11/20179/12/2017
S3S49/12/20179/13/2017
S4S59/13/2017

9/14/2017

in the above table we don't have data for S2-S4 but we should be able to calculate the date diff (9/11/2017 - 9/13/2017) =2

effinty2112
Master
Master

Hi Krishna,

The pivot table gives the average date difference.

S2=>S3 is 1

S3=>S4 is 1

S4=>S5 is 1

S5=>S4 is 0

S5=>S6 is 0

S6=>S7 is 0

S7=>S8 is 0


Anonymous
Not applicable
Author

But I want to determine the date diff from

s2-s4  s2-s5... s2-s8

s3-s5  s3-6...

s4-s6 ...s4-s8

...

as well