{"id":797,"date":"2012-08-11T20:25:57","date_gmt":"2012-08-11T10:25:57","guid":{"rendered":"http:\/\/ntsblog.homedev.com.au\/?p=797"},"modified":"2012-08-14T20:42:11","modified_gmt":"2012-08-14T10:42:11","slug":"ssrs-running-count-groups","status":"publish","type":"post","link":"https:\/\/ntsblog.homedev.com.au\/index.php\/2012\/08\/11\/ssrs-running-count-groups\/","title":{"rendered":"SSRS running count across groups"},"content":{"rendered":"<div id=\"ntsbl-819912826\" class=\"ntsbl-before-content ntsbl-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6288941070289539\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:inline-block;width:728px;height:90px;\" \ndata-ad-client=\"ca-pub-6288941070289539\" \ndata-ad-slot=\"9356781486\"><\/ins> \n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div><h2>The problem<\/h2>\n<p>You have a SSRS report which is grouping by a category.<\/p>\n<p>Assume you have 6 items in two groups. You want the first column to be a running row count across the groups. <\/p>\n<p>You Want a report that looks like this:<\/p>\n<p><a href=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_1.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"799\" data-permalink=\"https:\/\/ntsblog.homedev.com.au\/index.php\/2012\/08\/11\/ssrs-running-count-groups\/ssrs_1\/\" data-orig-file=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_1.png\" data-orig-size=\"310,291\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"SSRS Report\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_1-300x281.png\" data-large-file=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_1.png\" src=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_1.png\" alt=\"SSRS report with running total accross groups\" title=\"SSRS Report\" width=\"310\" height=\"291\" class=\"aligncenter size-full wp-image-799\" srcset=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_1.png 310w, https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_1-300x281.png 300w\" sizes=\"auto, (max-width: 310px) 100vw, 310px\" \/><\/a><\/p>\n<h2>The solution<\/h2>\n<p>In the &#8220;detail&#8221; cell for the first column use the following expression;<\/p>\n<p>=RunningValue(1, Count, Nothing) <\/p>\n<p><a href=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_2.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"800\" data-permalink=\"https:\/\/ntsblog.homedev.com.au\/index.php\/2012\/08\/11\/ssrs-running-count-groups\/ssrs_2\/\" data-orig-file=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_2.png\" data-orig-size=\"653,262\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"SSRS Report with expression definition for Running Total Count across groups\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_2-300x120.png\" data-large-file=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_2.png\" src=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_2.png\" alt=\"\" title=\"SSRS Report with expression definition for Running Total Count across groups\" width=\"653\" height=\"262\" class=\"aligncenter size-full wp-image-800\" srcset=\"https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_2.png 653w, https:\/\/ntsblog.homedev.com.au\/wp-content\/uploads\/2012\/08\/SSRS_2-300x120.png 300w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The problem You have a SSRS report which is grouping by a category. Assume you have 6 items in two groups. You want the first [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-797","post","type-post","status-publish","format-standard","hentry","category-reporting-services"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/797","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=797"}],"version-history":[{"count":0,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/797\/revisions"}],"wp:attachment":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=797"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=797"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}