Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with if statement

How can I put this in a set analysis expression?

NextEventDate>(if(ASofDate>=vAsofDateFrom and ASofDate<vAsofDateTo , ASofDate))

TIA for the help.

7 Replies
sunny_talwar

May be something like this:

Only({<ASofDate = {"$(='>=' & $(vAsofDateFrom) & '<' & $(vAsofDateTo))"}>} ASofDate)

Assuming the above will only result in a single ASofDate

Not applicable
Author

You mean...

Only({<NextEventDate= {"$(='>=' & $(vAsofDateFrom) & '<' & $(vAsofDateTo))"}>} ASofDate)

Thanks

sunny_talwar

Not sure what you are doing here -> NextEventDate>(if(ASofDate>=vAsofDateFrom and ASofDate<vAsofDateTo , ASofDate))

Are you checking if NextEventDate is greater than the right hand side of the expression?

Not applicable
Author

Yes that is right.

Thanks

sunny_talwar

Would you be able to share few lines of sample data? It would be easier to understand your actual requirement looking at some data, rather than guessing what it might be

Not applicable
Author

Thanks for your response. Unfortunately I can not share the data. But this is the expression I am trying in set analysis.

count(distinct (if([CMRNextDate]>AddYears(ASofDate,vFrequency) and [CMRDate]<=AddYears(ASofDate,vFrequency)

and [NextDate]>(if(ASofDate>=vAsofDateFrom and ASofDate<vAsofDateTo , ASofDate)) and EventDate<=(if(ASofDate>=vAsofDateFrom and ASofDate<vAsofDateTo , ASofDate)), CMR_FACT_KEY)))

Thanks for all the help.

sunny_talwar

Can you may be share some made up data which is similar to actual data. May be someone else can help you without the sample data, but for me, I would like to understand what you are trying to do and how it can be accomplished with set analysis.

Sorry for not being too helpful

Best,

Sunny