reportbuilder3.0report-builder2.0

Report Builder - Prevent duplicate data when doing `Sum()` function


I'm really new to report builder.

I'm trying to sum the GrossTotal of my data.. however it has duplicate values since I tried to join it on it's details.

enter image description here

here's what it looks like.. what I want is to omit the duplicate data when I'm doing the summation...

I've tried using SUM(!Fields.GrossTotal.Value) but gives me 4,600 value instead of 2,300

thanks in advance Guys...


Solution

  • First, delete all columns but the last one (preferably a column from details table). You shall hide the last column if it's not required.

    Than add a parent group using a unique column (BranchOrderID?) to your Details as shown below:

    enter image description here

    Add the remaining columns as inside group columns as shown below:

    enter image description here

    Finally, right click on your desired column (GrossTotal), then from the Tablix context menu (see picture above), select "Add Total" > "Before"/"After".