{"id":503,"date":"2015-07-26T16:02:06","date_gmt":"2015-07-26T14:02:06","guid":{"rendered":"http:\/\/www.flip-design.de\/?p=503"},"modified":"2015-07-26T16:03:31","modified_gmt":"2015-07-26T14:03:31","slug":"ssrs-summen-aus-anderen-gruppen-erhalten","status":"publish","type":"post","link":"https:\/\/www.flip-design.de\/?p=503","title":{"rendered":"SSRS: Summen aus anderen Gruppen erhalten"},"content":{"rendered":"<p>(see english Version below)<\/p>\n<p>In diesem Szenario will ich aufzeigen, wie man in SQL Server Reporting Services die Summen aus andere Gruppen (\u00fcber- wie auch untergeordnet) wiederverwenden kann, bspw. um Anteile berechnen zu k\u00f6nnen.<br \/>\n<a href=\"http:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignleft size-medium wp-image-505\" src=\"http:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix2-267x300.png\" alt=\"tablix2\" width=\"267\" height=\"300\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix2-267x300.png 267w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix2.png 651w\" sizes=\"(max-width: 267px) 100vw, 267px\" \/><\/a><\/p>\n<p>Im diesem Screen sieht man ein Tablix welches Gruppiert nach Ort ist und die Kopfzeile bildet. Darunter ist nach einem Status gruppiert und die Summen zu der jeweiligen Gruppe werden ausgegeben sowie auch f\u00fcr die Kopfzeile (fett gedruckt).<\/p>\n<p>Nun ist das Ziel, dass man anteilig ausrechnen kann, welchen Anteil der jeweilige Status an dem Ergebnis pro Ort hat.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Daf\u00fcr kann man die SUM oder auch COUNT Funktion erweitern indem man den Gruppennamen aus dem Tablix mitgibt:<\/p>\n<pre>=SUM(Fields!Betrag.Value)\/SUM(Fields!Betrag.Value, \"Wohnort\")<\/pre>\n<p><a href=\"http:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-504\" src=\"http:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix1-300x178.png\" alt=\"tablix1\" width=\"300\" height=\"178\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix1-300x178.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix1.png 849w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Weitere Informationen gibt es hier: <a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/bb630415(v=sql.100).aspx\">https:\/\/technet.microsoft.com\/en-us\/library\/bb630415(v=sql.100).aspx<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong>English Version<\/strong><\/p>\n<p><span class=\"hps\">In this scenario,<\/span> <span class=\"hps\">I will<\/span> <span class=\"hps\">show how<\/span> <span class=\"hps\">you can<\/span> <span class=\"hps\">in<\/span> <span class=\"hps\">SQL Server Reporting Services<\/span> <span class=\"hps\">to reuse<\/span> <span class=\"hps\">the<\/span> <span class=\"hps\">totals from<\/span> <span class=\"hps\">other groups<\/span> <span class=\"hps\">(over<\/span> <span class=\"hps\">like<\/span> <span class=\"hps\">subordinate<\/span>), <span class=\"hps\">eg<\/span>. <span class=\"hps\">To<\/span> <span class=\"hps\">calculate<\/span> <span class=\"hps\">the shares<\/span>.<br \/>\n<span class=\"hps\">In the following<\/span> <span class=\"hps\">screen<\/span> <span class=\"hps\">you can see<\/span> <span class=\"hps\">a<\/span> <span class=\"hps\">Tablix<\/span> <span class=\"hps\">is<\/span> <span class=\"hps\">that groups<\/span> <span class=\"hps\">by location<\/span> <span class=\"hps\">and<\/span> <span class=\"hps\">forms the<\/span> <span class=\"hps\">header<\/span>. <span class=\"hps\">Among them<\/span> <span class=\"hps\">is<\/span> <span class=\"hps\">for a status<\/span> <span class=\"hps\">groups<\/span> <span class=\"hps\">and<\/span> <span class=\"hps\">the totals<\/span> <span class=\"hps\">for<\/span> <span class=\"hps\">each group<\/span> <span class=\"hps\">will be issued<\/span> <span class=\"hps\">as well as<\/span> <span class=\"hps\">for the header<\/span> <span class=\"hps\">(in bold)<\/span>.<\/p>\n<p><a href=\"http:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-505\" src=\"http:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix2-267x300.png\" alt=\"tablix2\" width=\"267\" height=\"300\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix2-267x300.png 267w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2015\/07\/tablix2.png 651w\" sizes=\"(max-width: 267px) 100vw, 267px\" \/><\/a><br \/>\n<span class=\"hps\">Now<\/span>, the goal is <span class=\"hps\">that you can<\/span> <span class=\"hps\">calculate<\/span> <span class=\"hps\">proportionally<\/span> <span class=\"hps\">the share<\/span> <span class=\"hps\">has<\/span> <span class=\"hps\">the respective status<\/span> <span class=\"hps\">of<\/span> <span class=\"hps\">the<\/span> <span class=\"hps\">earnings per<\/span> <span class=\"hps\">site<\/span>.<br \/>\n<span class=\"hps\">For this you can<\/span> <span class=\"hps\">expand the<\/span> <span class=\"hps\">SUM<\/span> <span class=\"hps\">or<\/span> <span class=\"hps\">COUNT<\/span> <span class=\"hps\">function<\/span> <span class=\"hps\">by<\/span> <span class=\"hps\">mitgibt<\/span> <span class=\"hps\">the group name<\/span> <span class=\"hps\">from the<\/span> <span class=\"hps\">Tablix<\/span>:<br \/>\n<span class=\"hps\">=<\/span> <span class=\"hps\">SUM<\/span> <span class=\"hps atn\">(<\/span>Fields! <span class=\"hps\">Betrag.Value<\/span>) <span class=\"hps\">\/<\/span> <span class=\"hps\">SUM<\/span> <span class=\"hps atn\">(<\/span>Fields! <span class=\"hps\">Betrag.Value<\/span>, <span class=\"hps atn\">&#8222;<\/span>Location&#8220;)<\/p>\n<p><span class=\"hps\">Further information is available<\/span> <span class=\"hps\">here<\/span>: <a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/bb630415(v=sql.100).aspx\"><span class=\"hps\">https:\/\/technet.microsoft.com\/en-us\/library\/bb630415(v=sql.100).aspx <\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>(see english Version below) In diesem Szenario will ich aufzeigen, wie man in SQL Server Reporting Services die Summen aus andere Gruppen (\u00fcber- wie auch untergeordnet) wiederverwenden kann, bspw. um Anteile berechnen zu k\u00f6nnen. Im diesem Screen sieht man ein &hellip; <a href=\"https:\/\/www.flip-design.de\/?p=503\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":394,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[25,1,30,33,35],"tags":[],"_links":{"self":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/503"}],"collection":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=503"}],"version-history":[{"count":2,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/503\/revisions"}],"predecessor-version":[{"id":507,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/503\/revisions\/507"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/media\/394"}],"wp:attachment":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}