SCCM | How to create a report to show Hardware count and then OS (per HW count)











up vote
0
down vote

favorite












I never created a report in SCCM and I always used the inbuilt ones but now I need to track my PC's models per OS and I cannot find a report that can help me.
Looking online I found a few posts about counting the total of hardware models but nothing that would have the OS together in it.
Posts like
Posts like
Could you guys help me with this please? the end result would be:
Model Windows 10 Windows 7 Windows Server
DELL model 1 10 20 10
HP model 2 10 67 34



Thanks










share|improve this question


























    up vote
    0
    down vote

    favorite












    I never created a report in SCCM and I always used the inbuilt ones but now I need to track my PC's models per OS and I cannot find a report that can help me.
    Looking online I found a few posts about counting the total of hardware models but nothing that would have the OS together in it.
    Posts like
    Posts like
    Could you guys help me with this please? the end result would be:
    Model Windows 10 Windows 7 Windows Server
    DELL model 1 10 20 10
    HP model 2 10 67 34



    Thanks










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I never created a report in SCCM and I always used the inbuilt ones but now I need to track my PC's models per OS and I cannot find a report that can help me.
      Looking online I found a few posts about counting the total of hardware models but nothing that would have the OS together in it.
      Posts like
      Posts like
      Could you guys help me with this please? the end result would be:
      Model Windows 10 Windows 7 Windows Server
      DELL model 1 10 20 10
      HP model 2 10 67 34



      Thanks










      share|improve this question













      I never created a report in SCCM and I always used the inbuilt ones but now I need to track my PC's models per OS and I cannot find a report that can help me.
      Looking online I found a few posts about counting the total of hardware models but nothing that would have the OS together in it.
      Posts like
      Posts like
      Could you guys help me with this please? the end result would be:
      Model Windows 10 Windows 7 Windows Server
      DELL model 1 10 20 10
      HP model 2 10 67 34



      Thanks







      reporting-services sccm






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 31 at 17:54









      Maelito

      32




      32
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Expanding the example you already found, the query would look something like this



          select      cs.Model0, os.Caption0, count(*) as Count 
          from v_GS_COMPUTER_SYSTEM cs
          left join v_GS_OPERATING_SYSTEM os
          on cs.ResourceID = os.ResourceID
          group by cs.Model0, os.Caption0
          order by cs.Model0


          so the solution is to use the so called "grouping sets" and group by more than one property which you joined from another table






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53089376%2fsccm-how-to-create-a-report-to-show-hardware-count-and-then-os-per-hw-count%23new-answer', 'question_page');
            }
            );

            Post as a guest
































            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Expanding the example you already found, the query would look something like this



            select      cs.Model0, os.Caption0, count(*) as Count 
            from v_GS_COMPUTER_SYSTEM cs
            left join v_GS_OPERATING_SYSTEM os
            on cs.ResourceID = os.ResourceID
            group by cs.Model0, os.Caption0
            order by cs.Model0


            so the solution is to use the so called "grouping sets" and group by more than one property which you joined from another table






            share|improve this answer

























              up vote
              0
              down vote













              Expanding the example you already found, the query would look something like this



              select      cs.Model0, os.Caption0, count(*) as Count 
              from v_GS_COMPUTER_SYSTEM cs
              left join v_GS_OPERATING_SYSTEM os
              on cs.ResourceID = os.ResourceID
              group by cs.Model0, os.Caption0
              order by cs.Model0


              so the solution is to use the so called "grouping sets" and group by more than one property which you joined from another table






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                Expanding the example you already found, the query would look something like this



                select      cs.Model0, os.Caption0, count(*) as Count 
                from v_GS_COMPUTER_SYSTEM cs
                left join v_GS_OPERATING_SYSTEM os
                on cs.ResourceID = os.ResourceID
                group by cs.Model0, os.Caption0
                order by cs.Model0


                so the solution is to use the so called "grouping sets" and group by more than one property which you joined from another table






                share|improve this answer












                Expanding the example you already found, the query would look something like this



                select      cs.Model0, os.Caption0, count(*) as Count 
                from v_GS_COMPUTER_SYSTEM cs
                left join v_GS_OPERATING_SYSTEM os
                on cs.ResourceID = os.ResourceID
                group by cs.Model0, os.Caption0
                order by cs.Model0


                so the solution is to use the so called "grouping sets" and group by more than one property which you joined from another table







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 8 at 9:27









                Syberdoor

                1,5961513




                1,5961513






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53089376%2fsccm-how-to-create-a-report-to-show-hardware-count-and-then-os-per-hw-count%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest




















































































                    Popular posts from this blog

                    How to pass form data using jquery Ajax to insert data in database?

                    National Museum of Racing and Hall of Fame

                    Guess what letter conforming each word