3 Replies Latest reply: Oct 19, 2015 10:28 AM by Mark James RSS

    Comparison Operator in Set Analysis?

    Simon Hogg

      My financial periods are of the form mmyyyy, so 112104, 122014, 012015, 022015, etc.


      I would like to do a set analysis to say "Show me the actuals if the period is in the current year"


      I tried the following and it doesn't work;

          Sum({$<NUM(Right(Period,4))={$(=NUM(YEAR(Today())))}>}[Actuals (YTD)])


      Before I carry on hammering away at this, I just wanted to check whether this was even allowed, or whether I have to use an IF() statement in there instead so instead of NUM(Right(Period,4)) I have to use


              Sum({$< IF (NUM(Right(Period,4)) = NUM(Year(Today()))) , Period , Null()) = {$(=NUM(YEAR(Today())))}>}[Actuals (YTD)])


      (i.e. the Set Analysis must compare Period with a value - can it compare a function of Period with a value?


      Or am I over-complicating it?