April 26, 2012 at 7:34 am
Hi everyone
I have two fields in my SSRS report: TotalSales and CustomerSales. I would like to calculate the percentage of CustomerSales from the TotalSales. I'd like to do this with custom code as I'd like to reference the code in other percentage calculations in other reports in the project.
Thanks in adavance.
Craig
April 26, 2012 at 9:09 am
???
CustomerSales / TotalSales
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
April 26, 2012 at 9:37 am
Sean Lange (4/26/2012)
???
CustomerSales / TotalSales
Agreed.
Not sure you really need custom code for this?
April 26, 2012 at 9:49 am
Yeah, i can write the expression directly i suppose - guess I'm being lazy!
Thanks both
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply