Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Using YTD field in If statement

I am trying to write an if statement in an expression using a YTD (Year to Date) field.

What I want to do is find out if the month "July" falls within the YTD field.

So something like.....If YTD contains July, then 1, else 0.  I just don't know how to make the connection on a value that isn't actually part of the yield biut is associated with it.

Thanks in advance,

Steve

15 Replies
zagzebski
Creator
Creator
Author

July was just an example - I will need one for Jan, Feb Mar, etc. depnding on what time of the year it is. The YTD field is set to "YTD" or "NOYTD" for each month based on what time of the year it is but since the month is only associated to the YTD field and not an actual value within the field I don't know how to write expression.

zagzebski
Creator
Creator
Author

Thanks Neetha - YTD  is not a month field it is only an indicator that is associated to the month field so that wouldn't work

sunny_talwar

Would you be able to share few lines of data with the expected output?? I am unable to interpret your requirement.

sasiparupudi1
Master III
Master III

like this?

if(YTD='YTD',sum({<YTDFlag={1}>}Value),sum({<YTDFlag={0}>}Value))

jonathandienst
Partner - Champion III
Partner - Champion III

I think you are looking for something along these lines. Assuming you are in a table/chart with Month* as a dimension:

     =If(YTD = 'YTD', <expression 1>, <expression 2>)

The chart/table dimensions will get the appropriate values of the YTD field to enable you to choose which expression to use. This assume that the field YTD is properly associated with the field Month*.

* rename according to the month field in your application.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable

Hi,

Please elaborate on your requirement,so will be able to help.

Regards

Neetha