Anthony Giambalvo Posted June 14, 2023 Share Posted June 14, 2023 This formula works for me and gets all previous data...Sum([AVG_GAS_RATE_MCFD]) OVER (Intersect([WELL_NME],AllPrevious([DATE])))How do I replace AllPrevious([DATE]) with a specific date? I'm only concerned with data prior to 1 April 2023 and I need to do this with a calculated column. Link to comment Share on other sites More sharing options...
Gaia Paolini Posted June 14, 2023 Share Posted June 14, 2023 you could set up your calculated column as (use whatever date format you have for the specific date)case when DateDiff('day',Date('01/04/2023'),[DATE])<=0 thenSum([AVG_GAS_RATE_MCFD]) OVER (Intersect([WELL_NME],AllPrevious([DATE])))endbut this effectively means truncating the value at the specified date and having null values after that. Is this what you had in mind? Link to comment Share on other sites More sharing options...
Anthony Giambalvo Posted June 20, 2023 Author Share Posted June 20, 2023 Gaia,Thank you so much.That's exactly what I was after.Because I'm generating a forecast from a specific date in time, I don't want to show any of the data after that date.The above worked like a charm, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now