Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
mahendragaur
Creator
Creator

Variable manipulation

Hello,

I want to get the final output based on multiplication of variables and a column(Value) of a pivot in QlikView. Below is my requirement-

Variables-

   

Variables
A20
B50
C30
D60

Current Pivot Chart-

   

NameValue
A10
B20
C3
D40
E100
F60

Expected Pivot Chart-

   

NameValue
A200
B1000
C90
D2400
E100
F60

 

14 Replies
sunny_talwar

May be like this

Sum(If(Variable > 0, Value * Variable, Value))

mahendragaur
Creator
Creator
Author

I think we have to check for every name i.e. sum(if(Name='A', Value*A,if(Name='B',Value*B and so on ......)))

sunny_talwar

Why would you want to do that?

mahendragaur
Creator
Creator
Author

On the fly user wants to enter values and then it should multiply with the expected output which i mentioned.

prachisangewar
Creator
Creator

Hi,

Do you have Fixed number of Name values ? i.e you want to multiply only the four Name values with the variables?

If yes , attached is the solution.

mahendragaur
Creator
Creator
Author

I didn't find any attachment

prachisangewar
Creator
Creator

Hi,

Attached the qvw file below.

mahendragaur
Creator
Creator
Author

Any other solution? because I have to do it for 40-50 different variables and I already have so much calculation in expression.

klausskalts
Partner - Creator
Partner - Creator

I would use INPUTFIELD and INPUTSUM instead of variables - it's much more flexible.

Just remember to reset INPUT-values after each reload.