I am using DAX Studio and I would like to add a filter to the table field in SELECTCOLUMNS so that it using two different table depending on the filter's expression result. In other words what I would like to do is similar to the following :
DEFINE
VAR cond_talble =
SELECTCOLUMNS(
IF(@param1="1",TABLE1,TABLE2),
"column1",[column1],
"column2",[column2]
)
Thank you kindly
there is a work around for this problem but might not be a good one for everyone, and it's to add a column in both tables containing a boolean that is set to true for table1 and 0 for table2 and then (if your trables contains the same columns like me) get a table that is the fruit of the union of both tables and add an if condition on a filter so that you filter with the added column