Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

Difference between two expressions

Hi All,

What is the difference between the below expressions?

1) =Avg(Aggr( Sum(Sells), Products ))

2)=Aggr( Sum(Sells), Products )

Table:

LOAD * INLINE [

Products,Sells

Product 1,10000

Product 2,60000

Product 3,70500

Product 4,45000

Product 5,50200

];

Capture.JPG

1 Solution

Accepted Solutions
jagan
MVP & Luminary
MVP & Luminary

Hi,

You have only one record for each of the Product, if you have multiple records then you can see the difference.

Regards,

Jagan.

View solution in original post

3 Replies
robert_mika

In this situation the AVG does not do much

As you already use AGGR to group you product AVG from this group will be the same as the AGGR.

and is the same as

=Avg(Sells)

jagan
MVP & Luminary
MVP & Luminary

Hi,

You have only one record for each of the Product, if you have multiple records then you can see the difference.

Regards,

Jagan.

View solution in original post

jagan
MVP & Luminary
MVP & Luminary

Hi,

If you are using Product as dimension then there is no need of Aggr(), it should be used when there is no corresponding dimension used in the chart.

Below expressions also give the same result

1) =Avg(Sells)

2)=Sum(Sells)

Aggr() will have performance, so use it carefully whenever you need it really.

Regards,

jagan.