SSRS Percentage Expression

I am trying to write an expression to calculate the % of like fields in a column based on a common group.  Here is my report sample...  In the sample, I want to calculate the on-time % for each Driver.  Anyone know how to do this?  Would I need to create a parent group based on Driver to calculate from?

Driver         Performance     On-Time %

1                 On-time

1                 Late                  50%

2                 On-time

2                 Late

2                 Late                  33%

3                 On-time

3                 On-time             100%

April 23rd, 2015 11:58am

Hi,

See all calcualtions if you do in SQL query, it will help you in performance.

Anyway if you want to do this in SSRS , needs to create one parent Group based on Driver and add Group footer.

Add one column On-Time% and write below expression in the group footer as mentioned below:-

=(cdbl(sum(iif(Fields!Performance.Value="On-time",1,0)))/cdbl(count(Fields!Performance.Value)))

You can take reference of below screenshots:-

Thanks

Prasad

Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2015 9:30pm

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

Other recent topics Other recent topics