October 16, 2020 at 2:13 pm
I have a SSRS report that for a column, I need to calc the time different between the DateTime value in one row with the same column in the previous row to find the greatest interval of a set of rows.
Is this possible using expressions. Anyone face this challenge?
October 16, 2020 at 2:16 pm
Do you have to do this in SSRS, or can you do it within the source query?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
October 16, 2020 at 2:35 pm
The source query is limited because I'm OSI PISQLCLIENT which is pretty limited. It doesn't support sub queries or date function.
October 16, 2020 at 3:01 pm
OK. The Previous() function should get you the value of a data item from the previous row, which you can then use to calculate the time difference. I'm not sure whether that is enough to satisfy your requirement.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
October 16, 2020 at 3:04 pm
I was familiar with Previous() but unsure how I could loop thru and find the time difference between the Previous() and Current and store the greatest time difference.
October 16, 2020 at 3:28 pm
I have not tried this before, but have you experimented with Shared Datasets?
If you were to create one which included the calculated 'time difference' column, you could then create another dataset based on it.
Maybe that would give you the ability to get to where you need.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
October 28, 2020 at 7:36 pm
I've spent time on the SQL Server side developing a view with the data I need but still trying to find a way of using a dataset to query this view per row of my tablix. The query must use the two column field values in the row in the tablix. SSRS seems to block this. Is there any way around this?
November 22, 2020 at 6:45 am
This was removed by the editor as SPAM
November 22, 2020 at 6:48 am
This was removed by the editor as SPAM
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply