Wonseon LEE Posted June 17, 2020 Share Posted June 17, 2020 I have two datatable which i related. And i want to set trellis by another table's column. But spotfire says 'categorical expressions can only reference columns in the main table.' Is there any method to solve it Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted June 17, 2020 Share Posted June 17, 2020 Add the column you want to trellis by to the primary data table using the Data Canvas so it's available for Trellis operations. Link to comment Share on other sites More sharing options...
Wonseon LEE Posted June 19, 2020 Author Share Posted June 19, 2020 Would you mean join the column to the primary data table I already tried it, but my datas are too big to join. Is the only method to join for using another table column for trellis Link to comment Share on other sites More sharing options...
Anders Gavare Posted June 22, 2020 Share Posted June 22, 2020 As Kirsten wrote, the main table used in the plot needs to have the column that you want to split/group by (in this case trellis). One way is to add (join) such a column to the table you are already using. Another way though, which may or not may not work depending on what your data looks like and what kind of aggregations you are using to display it, is to do it the other way around: Use the other table as the main data table in the plot, trellis using the column in that data table, and then pull in the (aggregated) measures from one or more secondary tables. For example Avg([TableA].[someColumn]), Median([TableB].[YetAnotherColumn]). For this to work, you need to configure Column Matches between the main data table and any tables you wish to pull in aggregated measures from. In some cases, the aggregation method First() is quite handy, if the data was already "aggregated" as one single value. That way, you are performing a kind of "live join" in that plot during rendering, rather than an explicit join in the data canvas. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now