Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

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?

1 Reply
qliksus
Valued Contributor

How to dynamically change aggregations?

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

Community Browser