Jump to content
The TIBCO Platform is a real-time, composable data platform that will bring together an evolving set of your TIBCO solutions - and it's available now! See more information here ×

Specifying a date in an expression so that only entries with that date proceed


Michael Hall 4

Recommended Posts

Hi,

I'm trying to create an expression for a calculated column that converts all of my units into megawatts, but with a few extra requirements as follows:

 

If something is classified in a certain way, the result is NULL, so that it doesn't interfere with a weighted average calculation later.

If it isn't a given date the result must also be 0 so that it doesn't interfere with the weighted average calc later (this is the problem step)

The rest of the calculation just converts all of my other units into Megawatts

 

 

Here's what I have so far:

The [Delivery date] column is"Date" data type, and is in dd/mm/yyyy format.

case

when [Classification] in ("aaa", "bbb", "ccc", "ddd", "eee", "fff", "ggg", "hhh") then NULL

if ([Delivery date]=Date(01/01/2019)

Link to comment
Share on other sites

Try making your [AMT UNIT] its own case Statement "[AMT UNIT SCENARIO]"

 

case

when [Classification] in ("aaa", "bbb", "ccc", "ddd", "eee", "fff", "ggg", "hhh") then NULL

when [Delivery date]!=Date(01/01/2019) THEN NULL

when [Delivery date]=Date(01/01/2019) THEN [AMT UNIT SCENARIO]

else 0

END

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...