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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bharatkishore
Creator III
Creator III

Min and Max Values

Hello All,

                   I had a list box and i created A anb B fields.I will show you the code for your better understanding

T1:

LOAD * INLINE [

    A, B

    4, 8

    5, 11

    69, 31

    200, 91

    1, 7

    10 , 5

];

STORE  T1 into T1.qvd;

INPUTFIELD A,B;

T1:

LOAD A,

     B

FROM

T1.qvd

(qvd);

A:

LOAD 'A' as F,

Max(A) as MaxA,

Min(A) as MinA

Resident T1;

//DROP Table T1;

B:

LOAD 'B' as F,

Max(B) as MaxA,

Min(B) as MinA

Resident T1;

DROP Table T1;

Now i need to create a variable.For example say variable name as vAMin.Now if i click on A the value should directly go and store into vAMin variable same for Max also.

Can anyone please help me how to do it.

Regards,

R.Bharat Kishore

20 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

Please post your app.

bharatkishore
Creator III
Creator III
Author

I attached Please Check

Jason_Michaelides
Partner - Master II
Partner - Master II

Remember I said you don't need to define the Min and Max in the script.

See attached.  Hope this helps,

Jason

bharatkishore
Creator III
Creator III
Author

Jason actually my requirement is different.It is when we click on A it should display the min and max value of A in the text object.

And same for B also.Please don't mind.If possible please help me and i am so thankul to you because you are giving your precious time for me.

Regards,

R.Bharat Kishore

Jason_Michaelides
Partner - Master II
Partner - Master II

Maybe use a data island.  See attached.

bharatkishore
Creator III
Creator III
Author

Jason But in that List Box the Min and Max values Also should display.Then my proble is solved.Everything is correct except that Min and Max values in that Listbox.

Please help me.

Regards,

R.Bharat Kishore

Jason_Michaelides
Partner - Master II
Partner - Master II

Right.  I think I finally understand your requirements....!

You're data model is wrong and not expandable.  I've assumed that your inline table is just an example and actually you will load much more data from a database or flat file. You data may have more than just A and B also - maybe A,B,C,D,E and F.  So I've "crosstabled" the data in the script and used listbox expressions to control the display - you do not need to use any variables.

However, this solution means that your selection in the listbox affects the rest of the data...

Hope this helps,

Jason

Jason_Michaelides
Partner - Master II
Partner - Master II

With option to not affect the rest of the data...

bharatkishore
Creator III
Creator III
Author

Jason sorry for asking you these many times actually in our list box we need to display min and max values before clicking and also after we  click then it should display in text objets.

I am attaching my file again please have a look.

Regards,

R.Bharat Kishore

Jason_Michaelides
Partner - Master II
Partner - Master II

Here you go then.  Of course this means you have to create your text boxes in advance for each different Fiald value (A,B,C etc) - it won't expand automatically.

Jason