calcualte percent in reporting services
Hi! I,ve made en report in reporting services (report designer) 2008 to show age intervals for customer invoces. The report is grouped by customer and region and total. My problem is that i would also like to calculate the Percent of overdue invoices for customer, region and total in the report. Ive used the first part of the code belo =IIF(Datediff("d",Fields!Datum.Value, Today)>= 30,1,0) / count(Fields!ÄrendeNr.Values) w to display number of overdues but how should it be written to display the overdues as a percent of total invoices as the code i tried isnt working? Arne Olsson
September 30th, 2011 5:18am

Hi, I think by using your syntax overdue count would be =sum(IIF(Datediff("d",Fields!Datum.Value, Today)>= 30,1,0)) and percentage =(100/count(Fields!ÄrendeNr.Values)) * sum(IIF(Datediff("d",Fields!Datum.Value, Today)>= 30,1,0)) please let me know if that was helpful. wmel
Free Windows Admin Tool Kit Click here and download it now
September 30th, 2011 4:40pm

Hi, I think by using your syntax overdue count would be =sum(IIF(Datediff("d",Fields!Datum.Value, Today)>= 30,1,0)) and percentage =(100/count(Fields!ÄrendeNr.Values)) * sum(IIF(Datediff("d",Fields!Datum.Value, Today)>= 30,1,0)) please let me know if that was helpful. wmel
September 30th, 2011 11:39pm

Hi, Instead of calculating the percentage at the report level, please calculate the percentage at the SQL query itself. By doing so the performance of the report will not be impacted in case the data is huge. Thanks, Shobhit
Free Windows Admin Tool Kit Click here and download it now
October 2nd, 2011 7:42am

Hi Arne Olsson, You can try below expression: =SUM(IIF(Datediff("d",CDate(Fields!Datum.Value), Today)>= 30,1,0)) / count(Fields!ÄrendeNr.Values) Then set the textbox's format property to P2, you can refer to Standard Numeric Format Strings http://msdn.microsoft.com/en-us/library/dwhawy9k(v=VS.95).aspx If you have any question about the steps, please feel free to ask. Thanks, Challen Fu Please remember to mark the replies as answers if they help and unmark them if they provide no help.
October 2nd, 2011 11:10pm

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

Other recent topics Other recent topics