2 Replies Latest reply: Jun 1, 2015 10:44 AM by Sunny Talwar RSS

    Cyclic Groups and if statement



      I'm trying to create a line showing my 'actual pass rate' and my 'forecast pass rate' in one expression based on how many orders I have in the system. I have a cyclic group where the user can switch between the 'Planned Delivery' date and the 'Promised Delivery Date', but I want the line to show where the cyclic group is less than today. Currently I have:


      =IF(GetCurrentField([PD/PDD]) < MonthStart(Today()),



      The issue is that it is only showing the 'actual pass rate' indicating that something is wrong with the if statement.


      Can anyone see where the issue is?


      Kind Regards


        • Re: Cyclic Groups and if statement
          Gysbert Wassenaar

          GetCurrentField([PD/PDD]) simply returns the field name, not the value of the field. Perhaps this works:


          =IF( $(='[' & GetCurrentField([PD/PDD]) & ']') < MonthStart(Today()),


          • Re: Cyclic Groups and if statement
            Sunny Talwar

            I doubt that your column names are actual dates. GetCurrentField([PD/PDD]) outputs a column header. I think you are trying to do something else, try this maybe:

            =IF(GetCurrentField([PD/PDD]) = 'Planned Delivery',

            (SUM({<[Planned Delivery] = {"<=$(=MonthStart(Today()))"}>}_DELIVERED_ONTIME)/SUM({<[Planned Delivery] = {"<=$(=MonthStart(Today()))"}>}_OVERALL_DELIVERIES))*100,

            ((SUM({<[Promised Delivery Date] = {"<=$(=MonthStart(Today()))"}>}_DELIVERED_ONTIME) + SUM({<[Promised Delivery Date] = {"<=$(=MonthStart(Today()))"}>}_FORECAST_DELIVERIES))/SUM({<[Promised Delivery Date] = {"<=$(=MonthStart(Today()))"}>}_OVERALL_DELIVERIES)*100)