Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content

How to I create a calculated column for prior week ("dd", -*,DateTimeNow())


David Youngquist 3

Recommended Posts

I am interested in comparing average data from current week (last 7 days) and the week prior (7 days before current week). I am able to calculate out the current week using the following calc column:

Current Week =

case

when [end]>DateAdd("dd",-7,DateTimeNow()) then Avg([Count(emission_rate)]) OVER (Intersect([node_name],LastPeriods(7,[end])))

else NULL

END

Prior Week = (I've tried using the following)

case

when [end]>DateAdd("dd",-14,DateTimeNow()) and [end]

Link to comment
Share on other sites

Hello David,

 

This question appears to be very similar to the other one you created around the same time - https://community.tibco.com/questions/how-do-i-create-calculated-column-prior-week-dd-datetimenow - where there is now an active discussion. Unless you see a need for this question to remain as well, I suggest that further activities are done in the other question.

 

Best Regards

Fredrik Rosell

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...