Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Dynamically change values based on user input

Hello Everyone,

I am new to qlikview. I have following scenario

Namequantiy(User_input)resultnew result
ABC10
ABC15
XYZ20
PQR35
LMN45

expected output:

Namequantiy(User_input)resultnew result
ABC21012
ABC31518
XYZ52025
PQR103545
LMN45

Like excel, upon entering values in quantiy(User_input)  (on the go/dynamically) column ,the "new result" column  should display the values it is simple addition of (quantity + result). I think there should be some way to create this using variables but I am not being able to develop this. Moreover inputsum function would not work as I want the values for individual rows.

basically, like in excel we apply formulas =() in the cells and based on the formulas values get dynamically calculated on the go. So exactly same feature I need in qlikview

Any help will be appreciated.

Thank you

1 Solution

Accepted Solutions
vishsaggi
Esteemed Contributor III

Re: Dynamically change values based on user input

Try this?

INPUTFIELD FieldName;

Table:

LOAD *, 1 AS FieldName INLINE [

Name, Result

ABC, 10

ABC, 15

XYZ, 25

DCE, 45

ADC, 55

];

Using Straight table:

Add Dim as Name

Expr: Inputsum(FieldName) -> Label this as Ifield

= Sum(Result) + Ifield -> Label this as New result


Test file attached.

4 Replies
Partner
Partner

Re: Dynamically change values based on user input

Hi Urmil!

Not sure how you will populate user input column, but calculated formula for "new result" column will be as follows

[result]+[quantity(user input)]

Thanks!

Partner
Partner

Re: Dynamically change values based on user input

You will need to create the input field in the script first.

Then you can input values into the input field via a table box object.

Finally you can use the expression Boris mentioned

Good luck!

Oscar

vishsaggi
Esteemed Contributor III

Re: Dynamically change values based on user input

Try this?

INPUTFIELD FieldName;

Table:

LOAD *, 1 AS FieldName INLINE [

Name, Result

ABC, 10

ABC, 15

XYZ, 25

DCE, 45

ADC, 55

];

Using Straight table:

Add Dim as Name

Expr: Inputsum(FieldName) -> Label this as Ifield

= Sum(Result) + Ifield -> Label this as New result


Test file attached.

Partner
Partner

Re: Dynamically change values based on user input

Yes, something like this.