6 Replies Latest reply on Jan 3, 2019 5:45 AM by Sander Binda

    If statement returns wrong value

    Sander Binda

      Here's the situation; I've added an Excel file with a budget to a SQL server. I created key identifier to connect the both of them.

      I made a crosstab with the date on rows and the budget on text.

      The calculated field I use is {fixed [key identifier] : min([Budget])}.

      This works perfectly fine but here's the catch: If I want to show the budget of yesterday it starts giving me wrong values

       


      I use IF [date]=today()-1 THEN  {fixed [key identifier] : min([Budget])}.

      The number is off by that much that I do not even know where it comes from.

       

      For example january 2nd 2019:

       

      {fixed [key identifier] : min([Budget])} returns 44559 (correct value).

      IF [date]=today()-1 THEN  {fixed [key identifier] : min([Budget])} returns 4789247.