Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am actually trying to see how I can compare fields from 2 different tables using SET ANALYSIS.
Table1:
Id Name
100 JOHN
101 JAKE
102 MIKE
104 AMY
Table2:
Name Amt
MIKE 200
AMY 500
BOB 300
In my output I want something like : SUM({$<Table1.Name = Table2.Name>} Table2.Amt) but this is not working.
Can someone please provide the correct syntax for doing this comparison (without using an IF statement, since that’s very memory intensive) ?
Also, please don't suggest the joining of the 2 tables in the script itself, since my example is just a very simplified version of the real one.
Thanks.
First you need to pass the value from Table1.Name into a variable, then you need to use this value in your set analysis expression. Like this example:
=SUM({<Table2.Name = $(=Variable)>} Table2.Amt)
this way is the simplest way to use with Island tables in your data model. I hope this is helpful.
Thanks and regards,
Walid
Please let me know if this was helpful.
Thanks
Hi Walid,
If possible to pass multiple values from table 1 (island tables in my data model), do the comparison with table 2 columns, and if it meets certain criteria, then get selected values in table 1? thanks for your help.
Steven