AVG(...) for rows in Matrix Report in report services

Last post 05-27-2008, 7:07 AM by veysel. 1 replies.
Sort Posts: Previous Next
  •  05-11-2008, 2:19 PM Post number 52427

    AVG(...) for rows in Matrix Report in report services

    Hi,

    In my matrix table in Report Services i haven't any problem with creating total Sum for all my grouped elements but i can't create average for my columns in each grouped elements, is it possible ? Can anyone  help me with that ?

    Best Regards

    [JB]

  •  05-27-2008, 7:07 AM Post number 55876 in reply to post number 52427

    • veysel is not online. Last active: 27-05-2008, 7:23 AM veysel
    • Top 500 Contributor
    • Joined on 05-27-2008
    • Istanbul
    • Level 1: Deep thought

    Re: AVG(...) for rows in Matrix Report in report services

    hi gruby.lilo,

    May I help you if you sent your samle. because I did it :)

    I m sending a sample for you. I hope it be helpfull for you.

    VI

    ***************

    use pubs
    --select * from sales
    select
         GROUPING(datepart(yy,ord_date)) ,
         datepart(yy,ord_date), --sadece buna ait diptoplamları alalım
         stor_id, 
         payterms,
         sum(qty),
         count(qty)
    from sales
    group by
        datepart(yy,ord_date), stor_id, payterms
    with rollup
    having
       1 = case
             when GROUPING(datepart(yy,ord_date)) = 0 and ( GROUPING(stor_id) = 0 and GROUPING(payterms) = 0 ) then 1
             when GROUPING(datepart(yy,ord_date)) = 1 then 1
             else 0 end
    order by
        GROUPING(datepart(yy,ord_date)) ,
       datepart(yy,ord_date)


    Veysel Ispir
    Istanbul TUR
View as RSS news feed in XML