I have used below DAX & result is ok but pls help me to get same data from two tables

  1. SALES
  2. RETURNS

both tables have same 3 columns.. & I want to take this data in new table..

Pls help me to get this from two tables into one


How to select N columns from a PowerBI table?

answered Oct 6, 2020 at 14:33 Alexis Olson

The SELECTCOLUMNS function allows you to pick specific columns.

For example:

New Filtered Table = Customers = DISTINCT( SELECTCOLUMNS ( CALCULATETABLE ( SALES, NOT ( ISBLANK ( SALES[Customer Number] ) ), NOT ( ISBLANK ( SALES[Customer Name] ) ), NOT ( ISBLANK ( SALES[Customer Location] ) ) ), "Customer Number", SALES[Customer Number], "Customer Name", SALES[Customer Name], "Customer Location", SALES[Customer Location] )) 
2

1 Answer

Simply use the SELECTCOLUMNS() function from your question on both tables and then combine the result with the UNION() function.

Result = UNION ( SELECTCOLUMNS ( SALES, ... ), SELECTCOLUMNS ( RETURNS, ...) ) 
0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.