11 Replies Latest reply on Jun 28, 2011 1:52 PM by .Yann Treguier

    Coding field formatting based on parameter selection

    .Yann Treguier

      I have a parameter allowing to switch between two measures:  "Loss", and "Loss per checking". If I choose "Loss", I want the field driven by the parameter ([LOSS_AMT_PREVIOUS_YTD]) to be formatted as "$"#,##0;("$"#,##0).  If I choose "Loss per checking" I want the field driven by the parameter ([LPA_CKG_YTD_RB])to be formatted as "$"#,##0.00;("$"#,##0.00).

       

      Is there a way to include format inside of the calculated field referencing the parameter? Here is the current code for that field:

      IF [Loss Measure] = 'Loss Per Checking' Then

      IF [Time Frame] = 'YTD' Then IF Right([TIME_GROUPING_YTD],4) = STR(DATEPART('year',DATEADD('year',-1, TODAY()))) Then [LPA_CKG_YTD_RB] END END

      ELSEIF [Loss Measure] = 'Loss' Then

      IF [Time Frame] = 'YTD' Then [LOSS_AMT_PREVIOUS_YTD] END

      END