Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to return a value based on a previous record in a pivot, but the "above: function does not seem to be working for me. Attached is a picture of what I am trying to do. Any ideas? Thanks! - Mike
Thanks for the tip. I finally got this resolved by creating a resident table using the previous function:
INNER JOIN
LOAD
CPvCCC AS CPvCCCx,
Daily_Production_Schedule.Production_Run_ID,
if(CPvCCC=previous(CPvCCC), '0', '1') as CPvCCCChange
RESIDENT DailyProduction;
I used the previous function to create a value of 1 if the change accorded. Then I inner joined back to the main table on Production Run ID, and just simply summed up all the "1"s to be found. The comparison of records within dimension groups was confusing, but once I understand that, I was able to come up with the resident table work around using the "previous" function. The key was to limit my data set down to two columns... Thanks for the help.