cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
suzinabdn Frequent Visitor
Frequent Visitor

Union two tables with different columns names and field order when I can't use the Query Editor

I have been given a pbix file and been asked to make new visualisations to allow different analysis to be undertaken.  I need to union two of the tables to be able to get what the user requires.  Problem is the two tables have the same fields in a different order and some of the field names are differnt.

 

Normally I would edit the query to return the data in the way that I need it to do the union but I cannot access the database to allow me to do this so I am trying to reorder the fields in the Data view of the desktop and then union the tables together when the fields are in the correct order. 

 

Is there a drag and drop / move function in the data view  that I can use? Can I create a new table using DAX so that columns are in the correct order ready for the UNION?

 

Thanks in Advance

Susan

1 ACCEPTED SOLUTION

Accepted Solutions
danno Regular Visitor
Regular Visitor

Re: Union two tables with different columns names and field order when I can't use the Query Editor

I guess your options would be: 

- export the data from the desktop to a csv and reimport - this would be difficult as you would be starting from scratch with a new combined table, but you could re-point the measures and fix the visuals

- go back and get permissions

 

3 REPLIES 3
danno Regular Visitor
Regular Visitor

Re: Union two tables with different columns names and field order when I can't use the Query Editor

For each table there would be a query in the pbix file, taking data from separate tables in the database.  Append As New would give you a Union across both tables, and will ensure that columns are aligned, without them necessarily being in the correct order. 

 

There is no way to combine tables other than using the query editor and appending the datasets.  

 

Are you unable to Append as New with the existing tables? 

suzinabdn Frequent Visitor
Frequent Visitor

Re: Union two tables with different columns names and field order when I can't use the Query Editor

I do not have credentials to attach to the database to allow me to use any of the features in Query editor including Append. This is the reason I need to do it all in the data view of Desktop.


Susan

danno Regular Visitor
Regular Visitor

Re: Union two tables with different columns names and field order when I can't use the Query Editor

I guess your options would be: 

- export the data from the desktop to a csv and reimport - this would be difficult as you would be starting from scratch with a new combined table, but you could re-point the measures and fix the visuals

- go back and get permissions