Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
manuelrubiano
Partner - Contributor II
Partner - Contributor II

How to get value of same field from different row in straight table

Hi everybody. I would appreciate some help with this:

I'm trying to get the value of field price in everyrow but from a specific value of field Trade. For example what i'm expecting is column compareprice of the next table. Where compareprice is the value of price where Trade = 'WM_GT'

Captura.PNG

 

The next step is i can choose dynamically the Trade i want compare to every row for anyone combination of Country, Family, description and seller.

Thanks in advance.

1 Solution

Accepted Solutions
edwin
Master II
Master II

try this expression:  = sum(total <Description> {<Trade={'WM_GT'}>}Price)

View solution in original post

4 Replies
edwin
Master II
Master II

try this expression:  = sum(total <Description> {<Trade={'WM_GT'}>}Price)

edwin
Master II
Master II

will the comparison always be WM_GT?  wouldnt the user want to select it?  if so create a variable that holds the selected trade (assuming user can only choose 1) with expression =only(Trade) 

then in the price expression:  sum({<Trade=>}Price)
and your compare expression: sum(total <Description> {<Trade={'$(YourVariable)'}>}Price)

manuelrubiano
Partner - Contributor II
Partner - Contributor II
Author

It Works. Thank you!

manuelrubiano
Partner - Contributor II
Partner - Contributor II
Author

Yeah. I'll have it in mind. Thanks.