3 Replies Latest reply: Oct 24, 2017 3:21 PM by Sunny Talwar RSS

    Variable's returning wrong values

    Josh Martyne



      I am using two variables to show two separate pieces of data. However, they are both returning the wrong (although similarish) values.


      I have defined by variables in the variable editor in Sense as:


      v_LatestCLD =  max ( { $<[Timeline Content]={"CLD"}> } [Timeline Start Date] )

      v_PreviousCLD = max( { <[Timeline Content] = {'.'}> * < [Timeline Date Change] =   {'<=$(=$(vTest1))'} > } [Timeline Start Date] )


      Where vTest1 is a variable that is attached to an input box, hence why these statements (at least the 2nd one) cannot be loaded in the load script. I have two tables showing the data, one that displays the above formula in measure columns, the second which displays the values calculated using variables, using the below forumla





      Table 1:     14-01-2018     31-12-2018

      Table 2:     04-07-1894     10-07-1894


      What am I doing wrong?   

      FYI, the requirement for the final state is to only display values in the table in which the dates are different. If v_PreviousCLD = v_CurrentCLD, that row should not be displayed.

      Thanks in advance