Shehryar Khan Posted March 17, 2022 Share Posted March 17, 2022 I am facing an issue when trying to add columns from two different data tables into a visual. My data source is Microsoft SQL Server and I have imported one fact table and one dimension table into my Spotfire file. I have a column match between these two table, and have created a relationship between the two tables as well based on the same field used in the column match (attached a screenshot of both). However, Iam unable to use any otherfield from my dimension table that was not used inthe column matchwith my fact table when creating a visual.The error I am getting is as follows: An expression used on an axis in the visualization is not valid with the current setup. Consider selecting a column from the main data table or specifying an aggregation method on that axis (I have attached a screenshot of the error as well) Link to comment Share on other sites More sharing options...
David Boot-Olazabal Posted April 1, 2022 Share Posted April 1, 2022 Hi Shehryar, I think you can only use the matched column in the visualization when adding columns from multiple data tables into a visualization. I have tested this in Spotfire 11.8, and I can add in matched/not matched state columns from multiple sources. But in the unrelated case, I will get a warning and a flat line for one of the columns. While in related state, there is no warning and both columns display their values properly. When you add a relationship between the two data tables, this makes no difference. Kind regards, David Boot-Olazabal Link to comment Share on other sites More sharing options...
Anders Gavare Posted April 13, 2022 Share Posted April 13, 2022 The key phrase in the error message is "Consider selecting a column from the main data table". Try changing the Data table in the legend (the main data table) to V_MIG_DimProduct. Then you can pull in Sum([sales Query].[sales]), Sum([sales Query].[units])as measures from secondary tables on the Y axis. However, depending on which other columns are used in the plot (such as V_MIG_DimProduct.Channel), data may be "smeared" if there is no column match for that column, which may or may not be what you want. (It depends on how the data is structured.) 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