Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis or Join

Table1 has three fields, a Ticker, Price, and Reference

Table2 has two fields, a Ticker and PickReference

I would like to display in a Straight Table the Ticker, PickReference number, and the corresponding Price

This statement works if only one Ticker is selected:    =Sum({<Reference={$(=[PickReference])} >}Price)

Is there a way to change this statement to show the entire table, all tickers, all referenced prices?

Or, would a Join during the load be a better solution?

Attached is my project.

Thanks!

1 Solution

Accepted Solutions
ronaldocarrijo
Partner - Contributor III
Partner - Contributor III

Use the formula:

Sum(if(Reference=PickReference,Price))

View solution in original post

7 Replies
Gysbert_Wassenaar

If PickReference and Reference contain the same data then rename PickReference to Reference. You could then also join the two tables so you end up with only one. It's not necessary, but an option.

The set expression calculates one set per chart, not a set per row. So it will very likely not do what you expect.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi Chris,

Try the expression.:

FieldValue('Price',  FieldIndex('Reference' ,PickReference) )

ExampleCode.png

Please, see attached.

Regards

Not applicable
Author

If it has to be a sum, you can try something like:

=Sum({<Reference=PickReference >}Price)

Problem is you lose the chart if you clear PickReference selections..

ronaldocarrijo
Partner - Contributor III
Partner - Contributor III

Use the formula:

Sum(if(Reference=PickReference,Price))

Not applicable
Author

Close!  But the DORM value is returning the CBST value for that date.  Looks like they are all returning the CBST values.

Not applicable
Author

CBST is returning a value of 126, I don't know where that is coming from.

My formula, close to what you suggested, works when only one Ticker is selected:

=Sum({<Reference={$(=[PickReference])} >}Price)

Not applicable
Author

Wow!   Simplicity!  

Thanks!