Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Match Column Data and get Value

AB
1100
299
398
1001
1010

I have this table.

I want to set B value ,If my value equals A .

For example ;

C = 1        =>   100

C=100      =>    1  

in my pivot table.

Have nice a day.

1 Solution

Accepted Solutions
sunny_talwar

This?

Capture.PNG

Expression: =If(Sum(Quantity) > 120, 0, Only(Aggr(If(A = Sum(Quantity), B), CustomerID, A, B)))


Update: Although the solution is working, I don't recommend this as this Aggr() function can take a lot of your system resources for a bigger data set. The same can be done in script which might take some time to run in the script, but will not affect your front end.

View solution in original post

20 Replies
sunny_talwar

Not sure where is C coming in from? Can you please elaborate?

Not applicable
Author

For example Sum(Quantity) for C

I want to insert one column in table if Quantity 30 (in A) to 100(in B)

if greater than 120 , set value 0

Thanks your interest.

@Sunny T

Anonymous
Not applicable
Author

You want to have 3rd column C as a expression??

Not applicable
Author

Yes I want to have 3rd column .

Thanks.

jyothish8807
Master II
Master II

Hi Murat,

Try like this in script:

Load A,

C,

if(A='1' and C='1','100',if(A='2' and C='2',99...... ) as B

from

<>

Hope it helps.

This is what i understand from your requirement.

Please elaborate a bit more about your requirement for better solutions.

Regards

KC

Best Regards,
KC
Not applicable
Author

Thank you Jyothish.

I can use your script but I want to find easy way for this.

I try to explain more understandable .

C is my expression column.

A and B insert data(in excel).

If C equals A , I want to get B value .

so If C =1 and look A and find 1 value after that get value in B (100) for A(1).

Mark_Little
Luminary
Luminary

HI,

Can you elaborate a little?

Not sure what you are trying to get to. It will be some form of if statement, but not knowing the full ins or outs it is hard to say exactly what to do and if it would be best to approach in the script.

Mark

jyothish8807
Master II
Master II

Hi Murat,

Over here when you say 'C', is it sum(Quantity) ?

Its still confusing.

Regards

KC

Best Regards,
KC
Not applicable
Author

Hi Jyothish,

Yes C is sum(Quantity)

Thanks.