1 Reply Latest reply: Sep 17, 2011 10:01 AM by susant Kumar swain RSS

    How to dynamically change aggregations?

      Hi everyone,

       

      I am pretty new to qlikview.

       

      In my qlikview app - I am trying to compare the no if visits that has happened on my Mobile site and my desktop site (full site as I call it).

       

      sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Mobile'}>} VisitsByPlatform.Visits )

      /

      sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Mobile','Full Site'}>} VisitsByPlatform.Visits )

       

      I get the source data for varied point of sale say one for UK, one for US, one for Germany and so on. But the problem is that for all countries other than US I just have a mobile and full site data (no of visits), For US i have data saying no of visits that happened via IPHONE app, Android app and so on.

       

      So when the point of sale is getting displayed (via list box) in my app I will have something like this

       

      MUK (meaning Mobile UK)

      MFR (meaning Mobil France)

      MGR(meaning Mobile Germany)

      AUS(meaning Android US)

      MUS(meaning Mobile US)

       

      When the above options are selected, the formula listed above holds good for all POS other than MUS and AUS.

      When AUS is selected the formula should be something like this

      sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Android'}>} VisitsByPlatform.Visits )

      /

      sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Mobile','Full Site','Android'}>} VisitsByPlatform.Visits )

       

      For MUS the formula should be

      sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Mobile'}>} VisitsByPlatform.Visits )

      /

      sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Mobile','Full Site','Android'}>} VisitsByPlatform.Visits )

       

      How can I achieve this?

        • How to dynamically change aggregations?
          susant Kumar swain

          Hi prabha,

           

          Use a formula like  if ( getfieldselection(point of sale)='AUS',

           

          sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Android'}>} VisitsByPlatform.Visits )

          /

          sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Mobile','Full Site','Android'}>} VisitsByPlatform.Visits ) ,

           

           

          if ( getfieldselection(point of sale)='MUS',

           

          sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Mobile'}>} VisitsByPlatform.Visits )

          /

          sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Mobile','Full Site','Android'}>}  VisitsByPlatform.Visits ) ,

           

           

           

          sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Mobile'}>} VisitsByPlatform.Visits )

          /

          sum( {$<VisitsByPlatform.NewPlatform = {Total}, VisitsByPlatform.SiteType = {'Mobile','Full Site'}>} VisitsByPlatform.Visits ) )

           

          Regards,

          Saravanan