3 Replies Latest reply: Mar 9, 2018 3:10 PM by Carlos Londono RSS

    Amount Format

    Raman Raghav

      Hello All,

      I was trying to build a logic for last 12 months spend and below is the logic

       

      sum(if(DATE(date#(paid_date_trend, 'YYYYMMDD') ,'DD/MM/YYYY')>=addmonths(today(),-12) ,$(vAmount) )

      /$(vAmountDivisor),$(vFormat))

       

      variables I used

      1) vAmount =

      if(vSpendType = 'Sourceable', (if(is_sourceable = 'Y', amount))

      , if(vSpendType = 'SC Manageable', (if(is_sc_manageable = 'Y', amount))

        , amount))

       

      2)vAmountDivisor =

      if(vMoney ='Thousands',1000,

      if(vMoney = 'Millions', 1000000,

      if(vMoney = 'Billions', 1000000000,1)))

       

      3)vFormat

      if(vMoney ='Thousands','$#,##0.00K',

      if(vMoney = 'Millions', '$#,##0.00M',

      if(vMoney = 'Billions', '$#,##0.00B','$#,##0.00')))

       

                                         Data is not getting displayed,Can anyone let me know if the calculation needs any correction,

      TIA