Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Inputfield & InputSum

Hi All,

Currently I am working on InputField and InputSum.

If any one have the demo app on InputField and InputSum then pls share.

Thanks & Regards

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Upendra,

Just check the documentation in regards to those subjects. The most simple way is creating the following script:

INPUTFIELD Amt;

LOAD * INLINE [

Code, Amt

A, 100

B, 200

C, 300

];

Now create a new chart, select pivot or straight table, set Code as dimension and the following as expression

InputSum(Amt)

You will see how the total changes. In short, each field declared in the load script as an inputfield needs an InputSum() aggregation function instead of a Sum() to change its value in a chart.

If you want to see all available values for Amt, create a listbox and you will see how the cursor changes when you hover the values, so you can change them.

Hope that helps.

View solution in original post

7 Replies
Miguel_Angel_Baeyens

Hello Upendra,

Just check the documentation in regards to those subjects. The most simple way is creating the following script:

INPUTFIELD Amt;

LOAD * INLINE [

Code, Amt

A, 100

B, 200

C, 300

];

Now create a new chart, select pivot or straight table, set Code as dimension and the following as expression

InputSum(Amt)

You will see how the total changes. In short, each field declared in the load script as an inputfield needs an InputSum() aggregation function instead of a Sum() to change its value in a chart.

If you want to see all available values for Amt, create a listbox and you will see how the cursor changes when you hover the values, so you can change them.

Hope that helps.

Not applicable
Author

Hi Miguel,

Thanks you for the example.

How I use the InputSum with other functions or If statement? Because I am not able to edit the InputField when I use the If statement.

Is there anyway to do the same.

Thanks & Regards

Miguel_Angel_Baeyens

Hello,

You can use

InputSum(If(Field > 10, Amt))


That will return 0 if the Field has not a value greater than 10. Anyway, you can always change values in the listbox of Amt.

Hope that helps.

Not applicable
Author

Hi Miguel,

Thanks for your valuable input.

Thanks & Regards

Not applicable
Author

How can the same can be done, but using LOAD from the file say XL sheet, and not INLINE?

Miguel_Angel_Baeyens

Hi,

It always takes the same form, as in the code above. I have reformatted it to be readable in the new forums.

INPUTFIELD FieldName;

Table:

LOAD FieldName

FROM Excel.xls;

Regards.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Thanks, I did the same but not working. Strange thing is that it was working few months back, Same script not working now, particularly while loading from XL. INLINE is still working. I have already posted the query in a seperate thread. Please refer the following link:

http://community.qlik.com/thread/36665?tstart=30

It will be a great help to me if you can show some light on it. Best Regards.