Adding values in an expression
Hi I am trying to add JobBilledExVat with CreditNotesExVat in the first part of the equation and then add the outcome of that to WIP Written out, now I have already summed them up within the dataset, I am using the below =Sum(Fields!Sum_JobBilledExVAT.Value, "BilledJobType21") + Sum (Fields!Sum_CreditNotesExVat.Value, "CreditNotes") + Sum(Fields!Sum_WIPWrittenOut.Value, "WIPWrittenOut") The only problem is it is adding together all the sums together and I dont want that as I have already done the Sum in the Dataset, so I recognise I need to change Sum(Field to something else but everythin else I have tried brings up an error, any ideas where I am going wrong? Cheers
June 20th, 2011 7:07pm

What is BilledJobType21, CreditNotes, WIPWrittenOut? Are these groups? If yes, then aggregations(sum) will be performed by each value in the group.
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2011 7:29pm

BilledJobType21, CreditNotes and WIPWrittenOut are all seperate Datasets as they are in seperate parts of the database So I am trying to do the following math (Sum.JobBilledExVAT+Sum.CreditNotesExVat) + Sum.WIPWrittenOut =
June 20th, 2011 7:36pm

Sum(Fields!Sum_JobBilledExVAT.Value, "BilledJobType21") In the above expression, you are telling SSRS to sum up everything in the data set. Why can't you just use Sum(Fields!Sum_JobBilledExVAT.Value)?
Free Windows Admin Tool Kit Click here and download it now
June 20th, 2011 7:47pm

I thought I had to use the dataset name in " "'s as I was bringing through data from different datasets? I dont actually want to Sum them up but everything else I try just gives me an error message only the above code doesnt but then obviously it adds all the sums up I was thinking I could use the following but it again brings up an error =((Fields!Sum_JobBilledExVAT.Value, "BilledJobType21") + (Fields!Sum_CreditNotesExVat.Value, "CreditNotes")) + (Fields!Sum_WIPWrittenOut.Value, "WIPWrittenOut") With this I am trying to add JoibBilled and CreditNotes up first then use that figure to add with WIPWrittenOut but it comes up with this error "The Value expression for the text box ‘Sum_JobBilledExVAT’ refers to the field ‘Sum_CreditNotesExVat’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case." I could use your code for the first bit JobBilledExVAT as the Tablix box is registered to BilledJobType21 dataset however I would need the ,"CreditNotes" to distinguish different Datasets? Just to confirm though I am only using Sum at the moment as its the only way I dont get an error but it then brings through the wrong figures I would like to know what to change the Sum(Fields!Sum_CreditNotesExVat.Value, "CreditNotes") for. Thanks for your help so far
June 20th, 2011 7:58pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics