2 Replies Latest reply: Oct 21, 2014 10:57 AM by David Rodriguez RSS

    How to compare two expressions with different values of the same field



      I have a problem making comparisons in a simple table. I need to compare data from two selections from the same field.


      1. This is my first expression: sum({<YEAR={$(=Max(YEAR))}>}Amount)


      I have the month short name field (called MONTH_SHORT_NAME) as a filter, if the user selects any month or months should sum the amounts for that month or months.


      2. I need another expression to sum the amounts of other selection of any month short name. Something like this: sum({$<YEAR={$(=Only(YEAR_2))}, MONTH_SHORT_NAME={$(=MONTH_SHORT_NAME_2)}>}Amount)


      I created a field outside the model to collect the month short name value (called MONTH_SHORT_NAME_2):




      Resident LkCalendar;


      I need to make comparisons between both.


      Any ideas?


      Thanks for all.