Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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];
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
Load Script added to original post