Forum Discussion
create new table with partial columns from another table in dax
I see what SqlJason is saying but it seems a bit crazy to bring in two tables by query twice, once with one set of columns and once with another, call the second import of the tables SelectedColumns1 and SelectedColumns2
In my case I wanted to use EXCEPT to find rows in SelectedColumns1 not in SelectedColumns2; this requires the two tables have a) exactly the same number and type of columns, and b) the right columns to produce the required result i.e. no identity type columns
What I'd really like to be able to do is to use EXCEPT and create my SelectedColumns1 and SelectedColumns2 on the fly, as table expressions, which doesn't seem to be possible
In my case using CALCULATETABLE will remove some rows, as pointed out by greggyb
I can't do what Greg_Deckler says either as if you copy the table you get all columns and there's no way to hid columns, or rather if you do hide them, it affects only the reporting not the matching - I think
JohnDawson - Don't copy the table, copy the query. Edit that query to remove the columns that you do not want. You now have 2 queries that create 2 tables, one with all the columns and one with fewer than all of the columns.
- Anonymous5 years agoNot applicable
Greg_Deckler , thanks for this elegant and simple solution.
- JohnDawson9 years agoFrequent Visitor
Yes @smoupre, that's what I've done - and indeed it seems the only way; I just thought there might be a more elegant solution. But thanks.