Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
swiftfahad
Contributor III
Contributor III

Select Maximum value in taxt box

Hi,

I am having a follwing table 

customerId Band date capacity
1 KU 22-Feb-22 1900
1 CU 22-Feb-22 1000
1 KU 13-Jan-22 2500
1 CU 13-Jan-22 1200
2 KU 13-Jan-22 1300
2 CU 13-Jan-22 800
2 KU 22-Feb-22 3000
2 CU 22-Feb-22 3500

 

I have two text boxt to show maximum capacity value base on data  i.e ( one box for KU-capacity and other for CU-capacity)

if user select customer one 

Ku-capcity text box must show : 1900 

cu-capcity box must show:  1000

because these are the values lie angainst 22/feb/2022 which is maximum or highest.

need expression for text box

i  m using

=sum({<date={'$(Max(date))'}>}capacity) but no result

Labels (1)
1 Solution

Accepted Solutions
abhijitnalekar
Specialist II
Specialist II

Hi @swiftfahad

I hope you are looking at the result as below.

abhijitnalekar_0-1645615394586.png 

abhijitnalekar_1-1645615445340.png

 

Please create one variable to set the max date as below

test as date(aggr(max(dated),customerId),'DD-MMM-YY')

and use below expression in the text to show CU value

sum({<dated={"$(test)"},Band={'CU'}>}capacity)

and do the use below for KU

sum({<dated={"$(test)"},Band={'KU'}>}capacity)

 

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!

View solution in original post

3 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @swiftfahad

I hope you are looking at the result as below.

abhijitnalekar_0-1645615394586.png 

abhijitnalekar_1-1645615445340.png

 

Please create one variable to set the max date as below

test as date(aggr(max(dated),customerId),'DD-MMM-YY')

and use below expression in the text to show CU value

sum({<dated={"$(test)"},Band={'CU'}>}capacity)

and do the use below for KU

sum({<dated={"$(test)"},Band={'KU'}>}capacity)

 

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
MarcoWedel

FirstSortedValue({$<Band={'KU'}>} capacity,-date)
Akeem
Contributor
Contributor


@MyAARPMedicare Login wrote:

Hi,

I am having a follwing table 

customerId Band date capacity
1 KU 22-Feb-22 1900
1 CU 22-Feb-22 1000
1 KU 13-Jan-22 2500
1 CU 13-Jan-22 1200
2 KU 13-Jan-22 1300
2 CU 13-Jan-22 800
2 KU 22-Feb-22 3000
2 CU 22-Feb-22 3500

 

I have two text boxt to show maximum capacity value base on data  i.e ( one box for KU-capacity and other for CU-capacity)

if user select customer one 

Ku-capcity text box must show : 1900 

cu-capcity box must show:  1000

because these are the values lie angainst 22/feb/2022 which is maximum or highest.

need expression for text box

i  m using

=sum({<date={'$(Max(date))'}>}capacity) but no result


So if the user types in a number more than 100 then it will automatically change the value to 100 using a keyup() function and if user types in a number less than 0 it will display as 0?