Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mborsadw
Partner - Creator
Partner - Creator

Computation in a pivot table

I need help calculating a measure in a pivot table which depends on 2 other measures.

The calculation is "The minimum number of cells (beyond the current column) in row A such that the sum of the values in row A exceeds the value of row B in the current cell)

See attached image.

Is this possible in a pivot table?

Here is the load script:

[Data]:

Load * inline [
Part,Measure,Date,Value
C1,B,8/20/2019,21
C1,B,8/21/2019,18
C1,B,8/22/2019,20
C1,B,8/23/2019,20
C1,B,8/24/2019,13
C1,B,8/25/2019,22.5
C1,B,8/26/2019,36
C1,B,8/27/2019,39
C1,B,8/28/2019,39
C1,B,8/29/2019,28.5
C1,B,8/30/2019,24.75
C1,A,8/20/2019,11
C1,A,8/21/2019,11
C1,A,8/22/2019,11
C1,A,8/23/2019,11
C1,A,8/24/2019,11
C1,A,8/25/2019,16.5
C1,A,8/26/2019,16.5
C1,A,8/27/2019,16.5
C1,A,8/28/2019,16.5
C1,A,8/29/2019,16.5
C1,A,8/30/2019,24.75
];

[PivotData]:
Generic Load Part, Date, Measure, Value Resident [Data];

Drop table [Data];

Labels (1)
2 Replies
dplr-rn
Partner - Master III
Partner - Master III

Should be possible using  before/after functions. (and maybe above)

https://community.qlik.com/t5/QlikView-Documents/Missing-Manual-Before-and-After/ta-p/1488064

 

share some sample data and we can try and help

mborsadw
Partner - Creator
Partner - Creator
Author

Load Script added to original post