Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
thanhphongle
Creator II
Creator II

if command with InputSum

Hello community,

this is my database:

Category
Rent termFactor
Car126%
Car245%
Ship128%
Ship244%
Estate362%
Estate481%

I want to create a table where I can manually put the rent term by the function InputSum. See below

CategoryInputSum([Rent term])Factor
Car245%
Ship128%
Estate362%

When I add for example 24 in the InputSum column, QV should check if InputSum([Rent term]) = 24, search 24 in [Rent Term] and give out the referring Factor which is 5%.

Can anyone help me how to create an expression which can do this?

4 Replies
Not applicable

Can you explain little bit more. I can't understand what you are looking for.

thanhphongle
Creator II
Creator II
Author

I want to create a list where i can manually put a number in a list for the [Rent term] by the function InputSum. After putting in a number in the column where the InputSum function is, qv should compare the number with the existing number in the database and assign the proper factor.

for example:

in a table chart i have

Category=Car, Ship & Real Estate,    now i create a function called InputSum([Rent term]),  now i add the numbers in the function.

Category          InputSum([Rent term])          [Rent term]              Factor    

Car                  24                                       12 or 24                 6% or 5%

Ship                 12                                        12 or 24               8% or 4 %

Real Estate       36                                        36 or 48               2% or 1%

Then QV should compare the adding number with the existing numbers in the database

Car = 24  search for 24 in [Rent term], if you find it , return the factor 5%

Ship= 12  search for 12 in [Rent term], if you find it , return the factor 4%

Real Estate= 36 search for 36 in [Rent term], if you find it, return the factor 2%

Hope you understand what my problem is

thanhphongle
Creator II
Creator II
Author

And somehow my INPUTFIELD command in the script is not working... My script

INPUTFIELD [Rent term];

LOAD

     Category,

     [Rent term],

     Factor

FROM

[A-Import_ITFM.xlsx]

(ooxml, embedded labels, table is Grunddaten);

Error message:

Duplicate keys when loading Input Field

thanhphongle
Creator II
Creator II
Author

Is there nobody who can help me?