Forum Discussion
Combine Two Visual Tables
I agree with AnkitKukreja that the simplest solution is to append the tables. You don't even have to change the model; simply create duplicates of the tables in Power Query and append them.
Having said that, here is an alternative.
Create a Dimension table for Data 1 and create the relevant relationships:
Then create measures following this pattern:
Data Combined =
VAR _T1 = VALUES(Table1[Data 2])
RETURN
IF(
COUNTROWS(
_T1) = 1,
MAX(Table1[Data 2]), MAX(Table2[Data 5]))
To get:
I've attached the sample PBIX file
If it is still unsolved, please provide a sample PBIX file
- Anonymous3 years agoNot applicable
Unfortunately this won't work because Table 1 and Table 2 are visual tables, not existing tables from the data source. Each column is basically from different tables within the data.
I tried replicating this by using SUMMARIZECOLUMNS and then appending the results, but there are so many relationships it runs the computer out of memory before finishing.The raw data is from Dynamics 365 and there are dozens of connections between the different tables.
- PaulDBrown3 years agoCommunity Champion
Ok. So are the datapoints actual columns or measures?
I take it there is a common field between the tables: Data 1, which can be appended into a dimension table as in the model I posted?
If so, you can alter the measures to include the measures you already have along the lines of:Combined = VAR _T1 = VALUES ( Table1[Data 4] ) RETURN IF ( COUNTROWS ( _T1 ) = 1, "[Measure 1]", "[measure 2]" ) // The [Measures] are in between " " to be able to show as text in the visualYou say the tables are visuals. So how are they constructed?
Otherwise we would need to play with an actual dummy PBIX file to be able to try to help further
- Anonymous3 years agoNot applicable
The datapoints are columns. Table 1 and Table 2 are constructed by using the table visual. Nothing fancy, each column from its respective table is dropped in. The problem is that Data 2 and Data 5 are columns from two entirely different tables, but the way the complex relationships work, pull the same data.
The data I'm using is sensitive so I unfortunately can't post specific examples, which I know is a pain when trying to figure the problem out.