Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

AGGR on Non-Explicit Dimensions

New to Qlikview and have been stuck on this problem:

I'm making a scatter chart with the "Product" as the dimension, "Price" as the x-axis, and "Speed" as the y-axis.  The problem I'm having is for the size of the bubble.  For the size of the bubble I want the sum of the averages of each month.  So for example, the size of the boat bubble would be:

Jul: 12+15 = 27 / 2 = 13.5

Aug: 50 + 60 = 110 / 2 =55

Sep: 20

13.5+55+20 = 88.5

I've tried this for the bubble size expression:

AGGR(

     SUM(

          AGGR(

               AVG(Quantity)

               , Product

               , Month

          )

     )

     , Product

)

But this doesn't work.  I'm thinking it's because "Month" isn't set as a dimension so it errors out somewhere?  So somehow I need to be able to use AGGR with dimensions that aren't explicitly set in the Dimensions tab of the chart object. Any help would be greatly appreciated.

Assume this data:

ProductSpeedPriceMonthQuantity
BikeSlowLowJuly12
BikeSlowLowJuly15
BikeSlowLowAugust50
BikeSlowLowAugust60

Bike

SlowLowSeptember20

Car

FastMediumJuly10
CarFastMediumJuly10
CarFastMediumAugust12
BoatModerateHighJuly14
BoatModerateHighAugust5
BoatModerateHighAugust6
BoatModerateHighAugust6
BoatModerateHighSeptember6
BoatModerateHighOctober4
BoatModerateHighOctober5
1 Solution

Accepted Solutions
maxgro
MVP
MVP

4 Replies
maxgro
MVP
MVP

PFA

1.png

Not applicable
Author

Wow I think that's what I'm looking for.  I'm running person edition and can't open up your file (working on getting a license).  Any chance you could explain what you did?  Sorry!

johnw
Champion III
Champion III

So that you don't have to wait, it looks like all they did was remove the outside aggr() from your expression, leaving:

    SUM(
          AGGR(
              AVG(Quantity)
              , Product
              , Month
          )
    )

Not applicable
Author

Thanks everyone!