1
votes

I have a dataset in SSRS which is actually a view that has following data

A   | B    | C
========================
B101 | Box   | 100
B101  | Box   | 100.2
B101   | Cart   |99
B102   | Box    |110

From the dataset, I need to repot sum of column C where C>=100 group by Col A and ColB So the report looks something like this:

A   |  B   |C
===============
B101  | Box  | Sum(100+100.2)
B102   | Box    |Sum(110)

I can't figure out how to achieve or set the query on the report dataset. Is there a way to do it without creating a new dataset that does group by?

2

2 Answers

1
votes

Is this what you are looking for?

SELECT A, B, SUM(C)
FROM TABLE
WHERE SUM(C) >= 100
GROUP BY A, B

If not I think you may be on about Drilldown reports that can sum in the header row. Have a look here.

0
votes

You can do this by applying an appropriate filter to the table and setting up the grouping as required.

I have the following data:

enter image description here

Create a table with a group based on A and B:

enter image description here

enter image description here

Add a filter at the table level to exclude rows < 100:

enter image description here

For my data I had to cast the the value to a Decimal type; you may not need to. This gives what I think are your required results:

enter image description here