Answered Adding fields together rather than concatenating them

  • יום שני 06 אוגוסט 2012 09:23
     
     

    Hi

    I am trying to add two fields from a data set together;

    =Fields!FirstNumber.Value + Fields!SecondNumber.Value

    The result returned is basically FirstNumberSecondNumber, rather than a total.

    How can I adjust this formula? Using a * for example, works just fine.

כל התגובות

  • יום שני 06 אוגוסט 2012 09:36
    משיב
     
      קוד כלול

    HI EPM !

    You might get the desired output using below expression;

    =SUM(Fields!FirstNumber.Value) + SUM(Fields!SecondNumber.Value)
    Please let me know if this doesn’t work for you. Hope I have answered you correctly.

    Thanks, Hasham Niaz

  • יום שני 06 אוגוסט 2012 09:45
     
     

    Hi EPM,

    You can convert the columns to int and then use '+' sign

    Cint(Fields!FirstNumber.Value )+Cint(Fields!SecondNumber.Value)

    Hope it Works !

    Thanks

    Esmari

  • יום שני 06 אוגוסט 2012 10:12
     
     תשובה

    would be safer to use double in case of decimals

    Cdbl(Fields!FirstNumber.Value )+Cdbl(Fields!SecondNumber.Value)


    Rgds Geoff
    ----------------------------------------------------------
    Mark as Answer if this resolves your problem or "Vote as Helpful" if you find it helpful.

    • סומן כתשובה על-ידי EPM Project User יום שני 06 אוגוסט 2012 10:33
    •  
  • יום שני 06 אוגוסט 2012 10:33
     
     
    Thanks everyone