How do you carry previous values forward over several rows of data?
![]()
In RRDI Report Studio we need to be able to show certain values over time on a day to day basis that are not tied to the DW snapshots. This value could be a string value, or an integer (integer extension), and could be from a custom attribute.
1/1/2015 1234 0 1/2/2015 1234 1 1 1/3/2015 1234 1 1/4/2015 1234 5 5 1/5/2015 1234 5 1/6/2015 1234 5 1/1/2015 1235 0 1/2/2015 1235 8 8 1/3/2015 1235 8 1/4/2015 1235 5 5 1/5/2015 1235 5 1/6/2015 1235 5
The above would show that for US 1234, it was 0, changed to 1 on 1/2, changed 5 on 1/4. Simliar for 1235, it was first 0, changed to 8 on 1/2, then to 5 on 1/4, So we see the appropriate values daily.
This is how it’s displaying: Date US ID SP Value History Value 1/1/2015 1234 0 1/2/2015 1234 1 1 1/3/2015 1234 0 1/4/2015 1234 5 5 1/5/2015 1234 0 1/6/2015 1234 0 1/1/2015 1235 0 1/2/2015 1235 8 8 1/3/2015 1235 0 1/4/2015 1235 5 5 1/5/2015 1235 0 1/6/2015 1235 0
So the question is: Is there a way to set the value (SP Value) to the previous row value when (SP Value) is null to get the report to show the daily value? And, this would need to work independent of the type of value (string, number, etc…).
I’ve tried adding a rownumber, copying the original query and doing a self join by rownum-1, but can only get it to cascade the value once, then goes back to zero.
Please help as this function is critical to several reports we need to produce. We are currently on CLM 5.0, with base RRDI install (No Insight)
|
Accepted answer
![]()
Hi Steve, you need to look at the [Business View].[Request Baseline] and join it with [Business View].[Request History]
I think this will give you what you need. Steve Maples selected this answer as the correct answer
|