0
votes

I am trying to populate a bar chart in SSRS using the following calculated field:

=COUNT(IIF(Fields!JobDeployment.Value <"1440",1,Nothing))/Count(Fields!CaseStatus.Value)

To explain it is the amount of tasks that have taken under a day to complete divided by the amount of tasks.

This is then attributed as a percentage each month and the end game would be that these percentages are in a bar chart.

Now when I select my bar chart with the Values series being the above calculated field it doesn't return any values

The data is correct in the table so I'm happy with that but when I want it in graph form, I am getting no results.

Could someone please be kind enough to give some pointers as to why this is the case

Thanks Dan

1
IIF(Fields!JobDeployment.Value <"1440",1,Nothing) -- So this will return 1 if true and nothing if false. Don't you want the # of tasks completed in the numerator?Jonathan Porter

1 Answers

0
votes

If you're using Visual Studio (as opposed to Report Builder) you should get an error message explaining why it didn't work. The expressions you can use within charts are limited. Instead, you can have the logic done at the dataset level and leave the aggregation to the chart.

  1. Add a calculated field to your dataset to check your condition.

    =IIf(Fields!JobDeployment.Value < "1440", 1, Nothing)

  2. In the chart, just compare the counts.

    =COUNT(Fields!FilteredJobDeployment.Value) / Count(Fields!CaseStatus.Value)