1
votes

I've recently started using SCCM in our Company and I'm now on to building reports through Report Builder. Currently I'm trying to do 2 things, I am trying to build a pie chart that shows the number of files that exists on a drive and a category groups of "older than five years" "Newer than five years". So far the best I can do is list the files and individual years. So it currently shows up like this:

Pie Chart

enter image description here

The Group Expression I'm using to make the category group show up as years is:

=Year(Fields!FileModifiedDate.Value)

I'm not real sure how I would modify that to show up as two categories "anything older than five years" and "anything newer than five years"

My next chart is a bar graph that would be a breakdown of the pie chart. I want to create a chart that shows the different file types and how many of them there are. I need help with this part, but can try to figure it out after I get the pie chart working.

Thanks,

J

1

1 Answers

0
votes

Try using:

=IIF(
Datediff(DateInterval.Year,Fields!FileModifiedDate.Value,Today)>5,
"anything older than five years",
"anything newer than five years")

If any file is exactly five years old it will be include in the anything newer than five years category, if you want to change that behaviour use >= instead.

Hope it helps.