Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Average without a Max and min value in Aggregation

Hi all

I have this:

ProductoPRECIOTIENDA
1101
1311
141
121
241
271
251
2101
152
1102
1152
2102
2202
2202
2302

I would like to have the average for each "TIENDA" and "PRODUCTO" without the max and the min value for each agregation.

TIENDA 1:     PRODUCTO 1     AVERAGE 17.5

TIENDA 1:     PRODUCTO 2     AVERAGE 6

TIENDA 2:     PRODUCTO 1     AVERAGE 10

TIENDA 2:     PRODUCTO 2     AVERAGE 20

I'm going to use in a expression of a simple table chart using TIENDA as dimension

I need Helpppppppppppp .... I'll pay you a beer ..... or two

Regards

M

17 Replies
Anil_Babu_Samineni

Can you look this?

Sum(Aggr(Avg({<PRECIO -= {'$(=Max(PRECIO))', '$(=Min(PRECIO))'}>} PRECIO), Producto, TIENDA))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hi Anil

Thanks for answer

We tried do it but it quits the max of all the PRECIO and the min of alL the PRECIO, don't subset the data in PRODUCTO ... I don't know if I'm explaining very good so .. later I'll send u a small QV to see what happens ... ok?

Anonymous
Not applicable
Author

Hi

Do you know how to attach documents??

It's looks imposible

Regards

M

Anonymous
Not applicable
Author

Hi Anil

Thaks a lot in advance

Here the real situation, I give u a small example in Qv and a small Excel to make the checking

Thank you very very very much ....

Anonymous
Not applicable
Author

HI Anil .. can u help me with this problem:::

Regards

M

Anil_Babu_Samineni

Still i am confusing, Why 17.5 Comes up instead of 7? Can you explain me the reason how you get for this filter

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

HI Anil, thank you for answering, I have a mistake with the average, the correct value is 7 .... sorry

Thanks a lot, I put attached an small example to work with

M

Anil_Babu_Samineni

In excel you are showing 7872, But in text object of Qlikview you want it as 8290. Can i know the Difference

For 7872, You need to write this?

Sum( Aggr(Avg(LM_PRECIO), LM_PRODUCTO_ID, LM_ENSENA_TEXT))

Capture.PNG

Or Remove the LM_PRODUCTO_ID from Table and then replace to expression

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful