Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Need to sum max values in a report with Hidden groupings

$
0
0
I have looked all over and have not found my exact situation, so I am posting my first question.  I have a report that I have grouped on multiple levels.  So my report has a customer/header/detail/release grouping.  I have written a custom expression so that only a single value, which is the max value in the group, is shown in the detail, with all values showing in the release.  I have then set my visibility toggle to toggle on header, then detail, then release and I need to sum up those max values into a field on the report.  The custom expression that I have written works correctly when you are showing on the detail level.  It gives the correct value, which is the max value in each release.
   
What I then need the report to do is to sum only that max value and roll that up into the header group, so that I get a total of the max values.  

I have tried using the MAX function in my expression to get the correct max value, but I cannot get SSRS 2008 R2 to sum that, and I have tried writing a custom expression that will calculate the max (Non-zero values divided by number of non-zero records) and both ways work correctly until I try to rollup and sum to the next group level.

I have also tried using a group variable and custom code to get the value and save it to a variable, but I have not had any luck in setting or getting that value correctly back to my report.

At its most basic it feels like I should be able to set a Sum(Max(Fields!ValueColumn.Value) and let SSRS handle how that should be broken out, but after trying that repeatedly I have still had no luck.  I cannot adjust the SQL as I need the level of detail that the report shows, although I could add more fields as long as I don't add any groupings or totals that would reduce the granularity of that data being returned.

Any new avenue to explore would be very helpful.

Thank you in advance,
Chad
 

Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>