
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sum the Average Unit Price
Hi,
I am looking to find the Average value of dimension [Invoice Item Unit Price]
I am struggling to get the right result back, any advice on this would be much appreciated
=Sum(Aggr(Avg([Invoice Item Unit Price]))) but this is not working
once i have this i will add the set analysis for the year
{<[Year]={'2019'}>}
but need to get the average right first. Any assistance would be very much appreciated.
Thank you in advance
Daniel
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The average value of [Invoice Item Unit Price] is found by using avg([Invoice Item Unit Price]). You do not need to aggregate.
If you do want to aggregate using aggr() then you need to define over which dimension you want to aggregate. The Aggr() takes two parameters.
Aggr(Sum([Invoice Item Unit Price]), DIMENSION)
Qlik Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
why you need aggregation ?
=Avg([Invoice Item Unit Price])
and
=Avg({<[Year]={'2019'}>} [Invoice Item Unit Price])
Taoufiq ZARRA
"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "
(you can mark up to 3 "solutions") 😉

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The average value of [Invoice Item Unit Price] is found by using avg([Invoice Item Unit Price]). You do not need to aggregate.
If you do want to aggregate using aggr() then you need to define over which dimension you want to aggregate. The Aggr() takes two parameters.
Aggr(Sum([Invoice Item Unit Price]), DIMENSION)
Qlik Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
why you need aggregation ?
=Avg([Invoice Item Unit Price])
and
=Avg({<[Year]={'2019'}>} [Invoice Item Unit Price])
Taoufiq ZARRA
"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "
(you can mark up to 3 "solutions") 😉

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
WOW!
Massively over complicated that one. added the year set analysis and all good.
Thanks a lot.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I have another post i am awaiting a reply on, i wonder if you could take a look.
thanks so much either way:
I need to find the % different between 2 sums, i have tried a few things but never get the calculated result below.
sum({<[Year]={'2019'}>} [HKD_Price])
and
sum({<[Year]={'2018'}>} [HKD_Price])
The figures are as follows and so know the difference must like below
2760530389.02
1504520710.05
58.8978% difference
