# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Rules, plus terms and conditions, can be found here.
New Contributor II

## tricky question about column total divided by accumulated sum

Hello,

I would like to create a line chart based on a pivot chart data.

Here is the pivot table,

The x-dimension of the line chart will be the Time2Fail values while y-axis will be the subtotal of Time2Fail / the accumulated sum.

for example, when x=Time2Fail=1, the y= subtotal of Time2Fail=1 (which is 7 in the pivot chart) / the latest accumulated sum=24847

when x=Time2Fail=2, the y=8/22898

... and so on.

I'm struggling to find write an expression for this scenario.

Can someone help me?

The qvw and qvd are attached.

4 Replies
MVP

## Re: tricky question about column total divided by accumulated sum

I tried to figure this out before also, but couldn't. I think the only person I can think who might be able to solve this is swuehl‌.

Best,

Sunny

New Contributor II

## Re: tricky question about column total divided by accumulated sum

Sunny T,

Thank you that you have given a try.

I'm also thinking to rearrange the original data to see if it can be done.

How to connect swuehl in this community?

Best,

Josh

MVP

## Re: tricky question about column total divided by accumulated sum

I have already linked my previous response to his name which would have sent him a notification that he is needed here. He will respond when he has time. I guess there is not much we can do

Best,

Sunny

New Contributor II

## Re: tricky question about column total divided by accumulated sum

Sunny T,

Thank you so much!

Josh