Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Associate Class with Nearest Max and Min

Hello All,

IdProductTotal NetPeriod (Its a Range belonging to User Input year 500)Class

1

A10000504.81000
2B20000504.71000
4A15000503.61000
3C25000503.41000
5B25000502.31000
6C30000501.81000
7A20000500.71000
8B25000500.11000
9C35000499.8500
10A25000498.6500
12B30000498.1500
13C15000495.2500

This is a sample data from my project.

I have User Input Box with Variable vYear . If I enter 500 then I get the nearest Max possible value near 500 which is 501.8 and nearest Minimum value Min possible near 500 which 499.8 in a Text Box.

Now, I have a code in my script editor.

NewClass:

Load * Inline{

Min, Max, Classss

1001, , <unknown>

500,1000,1000

250,500,500

100,250,250

50,100,100

,50,50

};

IM:

IntervalMatch(Period)

Load Min,Max Resident Newclass;

So now,

Whenever User inputs vYear = 1000 / 500 /250 /100 /50 in Input Box; my calculations should be like Total Net * vYear but vYear means Nearest Possbile Max and Min. I have to show this in Line Chart.

Dimension - Classs where on X-axis I will have 1000,500,250,100,50 and corresponding values of Nearest Max and Min on Y-axis i.e. Expressions..

How to associate this Classs with the Calculations??

I am very confused. Please help.

Thank you everyone in advance.

2 Replies
sunny_talwar

Would you be able to share a sample where you have been playing around with this? It would be easier to look at what you have and carry it forward

Anonymous
Not applicable
Author

Will send the screenshots and codes.