0 Replies Latest reply: Jul 16, 2015 6:03 AM by Minh-Tri Truong RSS

    Is there the need to aggregate data in a table?

    Minh-Tri Truong

      Hello All,

       

      I would like some advise about designing my cube.

       

      I have a table with all the invoice lines. One invoice can spread on multiple lines (for example 2 products, 1 discount, 1 delivery fees, so a total of 4 lines here)

       

      Facts table :

      - OrderNumber

      - Line type

      - Amount

       

      Now I need some basic information like

      - number of orders

      - average basket

       

      My question is :  Is it easier to work directly on this table only (for example with a count(distinct()), or is it better to create a table that will aggregate the data? For example :

       

      Aggr Data :

      load

         OrderNumber,

         1 as OrderecordCount,

         sum(amount)

      from Facts

      group by OrderNumber

       

      Thank you in advance,

       

      MT