Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate max n min?

Hi All,

I have to create the chart which will look like below Chart.

So I wrote the expression for Sale but I am not getting the Max & Min for the same

Expression for Sale

Sale=  sum({1<MONTH = {"<=9/30/2011  >=9/1/2010"},E_PRODUCT={HP} >}SALE)

MONTH

 

Sale

 

Max

 

Min

 

Sep 2011

 

110

 

110

 

11

 

Aug 2011

 

83

 

110

 

11

 

Jul 2011

 

73

 

110

 

11

 

Jun 2011

 

80

 

110

 

11

 

May 2011

 

71

 

110

 

11

 

Apr 2011

 

46

 

110

 

11

 

Mar 2011

 

51

 

110

 

11

 

Feb 2011

 

47

 

110

 

11

 

Jan 2011

 

33

 

110

 

11

 

Dec 2010

 

21

 

110

 

11

 

Nov 2010

 

17

 

110

 

11

 

Oct 2010

 

14

 

110

 

11

 

Sep 2010

 

11

 

110

 

11

 

Please help me with the expression to get the Max & Min values

Thanks in Advance

Regards,

Upendra

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     try this expression.

     Min({1<MONTH = {"<=9/30/2011  >=9/1/2010"},E_PRODUCT={HP} >}SALE)

     and

     max({1<MONTH = {"<=9/30/2011  >=9/1/2010"},E_PRODUCT={HP} >}SALE)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi Kaushik,

Thanks for the reply but these expressions doesnot give me the expected answer.

Let me explain you the table structuer

Month,Product,Channel,Sale

Sep11,HP,PH,100

Sep11,HP,AG,200

Sep11,HP,AP,125

Sep11,HP,CP,250

Sep11,HP,BC,450

Sep11,IBM,PH,100

Sep11,IBM,AG,200

Sep11,IBM,AP,125

Sep11,IBM,CP,250

Sep11,IBM,BC,450

Sep11,ACC,PH,100

Sep11,ACC,AG,200

Sep11,ACC,AP,125

Sep11,ACC,CP,250

Sep11,ACC,BC,450

Sameway I have fix products & channels for every month.So when I use sum() in the chart it will sumup sale for all products & channels for that month (which is working fine) but with max & min I want the max & min val of sale for the range of month.

I hope now you understand the exact problem.

Thanks & Regards,

Upendra