Forum Discussion
zamurr
10 years agoMicrosoft Employee
DAX - SelectColumns->Filter->Contains Syntax
Problem I want to filter my dataset while performing a DAX query. The problem i am having is setting the formula up correctly. From my understanding Contains takes a (table, comparision that ret...
zamurr
9 years agoMicrosoft Employee
I am new to DAX, so I am working my way through a complex problem. I am looking to create a table from columns in other tables. Here is the description of what I am trying to do
http://community.powerbi.com/t5/Desktop/Combine-multiple-tables-into-one-table/m-p/60752#M24933
I understand the SelectColumns, but what i dont understand is how to implement filtering. I want to filter out data before i create my table.
Do i want to filter on the outside of the DAX query?
Michaeldias
3 years agoHelper I
Had the same problem but the solution seemed straight forward after reading up the documentation.
Table 1 = Column1 with values A,B,C
The following gives all of Table 1 as new Table 2
Table 2 =
SELECTCOLUMNS( 'Table 1'
, "Column 1 Alias", [Column 1]
)
The following gives all of Table 1 without "A" as new filter Table 3 as the result of FILTER is a table
Table 3 =
SELECTCOLUMNS( FILTER ( 'Table 1', 'Table 1'[Column 1] <> "A" )
, "Column 1 Alias", [Column 1]
)