4 Replies Latest reply: Aug 30, 2018 11:15 AM by Francesco Cardinale RSS

    Measure divided between (team of) two dimensions / columns

    Francesco Cardinale

      Hello

      I have an input table with two dimensions <am1 and am2> and one measure <sales>, like the following:

       

      am1am2sales
      pluto7
      plutopippo4
      plutotopolino10
      pippo1
      pippopluto6
      pippotopolino2
      topolino5
      topolinopluto4
      Total39

       

      I would like to get an output table, in the app, like the following:

        

      amam teamsalessales by am
      plutopluto77
      plutopluto - pippo42
      plutopluto - topolino105
      plutopippo - pluto63
      plutotopolino - pluto42
      pippopippo11
      pippopippo - pluto63
      pippopippo - topolino21
      pippopluto - pippo42
      topolinotopolino55
      topolinotopolino - pluto42
      topolinopluto - topolino105
      topolinopippo - topolino21
      Totale39

       

      In wich I have:

      - am: all am (am1 or am2)

      - am team: am1 + am2

      - sales: sales of 'am team'

      - sales by am: if 'am team' is composed of 1 am -> sales, if 'am team' is composed of 2 am -> sales/2

       

      how can I get this result?


      Thanks

       

      EDIT 30/08/2018.

      The input table is actually just an extraction I posted as an example. It belongs to a complex snow-flake scheme defined in Qlik.
      am1 and am2 are fields of two dimension tables, sales is the field of a fact table. The fact table is connected to the two dimensions via id fields.