Forum Discussion
BIXL
Resolver I
10 years agocreate new table with partial columns from another table in dax
Hi I wonder if there is a way to create a table in dax that is the same like another table but with less colmun. for example : table "A" has "col1","col2","col3" I want to create table "B" with j...
leahYan
Advocate II
6 years agoI am not a pro power bi user. I think I find out an easy way to solve your problem if we are facing the same problem.
TABLE B =
SELECTCOLUMNS(CALCULATETABLE( TABLEA,FILTER(TABLEA,TABLEA[col1]=x)),"col1",'TABLEA'[col1],"col2",TABLEA[col2])
Consider the duplicate rows, you can wrap a "DISTINCT" on the formula as below"
TABLE B =
DISTINCT(SELECTCOLUMNS(CALCULATETABLE( TABLEA,FILTER(TABLEA,TABLEA[col1]=x)),"col1",'TABLEA'[col1],"col2",TABLEA[col2]))
- hello_MTC4 years ago
Helper III
what is that "x", make it simple bro! I didn't understand your dax function.