Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Return just one column from DAX table

I have a dax table (code below) wich return two columns (sample below).   DaxTable = var d = date(2022,9,30) var _table = CALCULATETABLE( SUMMARIZE( 'Table', [Project], "Measure", CALCU...
  • MAwwad's avatar
    3 years ago

    To return just the "Project" column from the table you have defined in your DAX code, you can use the SELECTCOLUMNS function to create a new table that contains only the columns you want to include.

     

    DaxTable = VAR d = DATE(2022,9,30) VAR _table = CALCULATETABLE( SUMMARIZE( 'Table', [Project], "Measure", CALCULATE( COUNT('Table'[key]), 'Table'[status]<>BLANK())- CALCULATE( COUNT('Table'[key]), 'Table'[status]="Fechadas")), 'Table'[date]=d) RETURN SELECTCOLUMNS(_table, "Project", [Project])