2 Replies Latest reply: Nov 10, 2011 1:48 AM by Kamal Naithani RSS

    Sub-Totals?

      Is there a straight forward way to do this, including the background colours?

       

      In SQL Server I'd get the data using something like this...

       

      GROUP BY

        Label1, Label2, MetaData1, MetaData2 WITH ROLLUP

      HAVING

        GROUPING(label1) = 0

        AND (

          (GROUPING(label2) = 0 AND GROUPING(MetaData1) = 0 AND GROUPING(MetaData2) = 0)

          OR

          (GROUPING(label2) = 1 AND GROUPING(MetaData1) = 1 AND GROUPING(MetaData2) = 1)

        )

       

       

      Label 1Label 2MetaData1
      MetaData2Expression1
      Week1Run1BlahDe Blah2
      Week1Run2aFooBar6
      Week1Run2bFlibbleDe Bob4
      Week1---12
      Week2Run3WibbleWobble5
      Week2Run4IzzyBusy3
      Week2Run5IngleburtSlapdeback7
      Week2---15

       

      I do know how to get an overall summary, but not multiple sub-totals depending on the data.

       

       

      (I've worked out a slightly hacky way, to get the task complete, now I'm looking to tidy things up and learn the correct way of doing things.)

       

       

       

      Cheers,

      Mat.

        • Sub-Totals?
          Barb Cline

          I'm not sure how to get the multiple sub-totals you desire, but I think I can help with the formatting.  If you turn on Design Grid (View... Design Grid), you are given additional options with right click over object.  Select "Custom Format Cell" to open a design menu. 

           

          I know this works for straight tables and pivot tables. (I'm using QV10)