Forum Discussion

TL5866's avatar
TL5866
Frequent Visitor
8 years ago
Solved

CALCULATETABLE on ALL(Table) not filtered

Hi,   I want to create a table containing (independent of the context) all rows of a table, but filtered on a column. A straighforward way is to use FILTER:   MyFilteredTable = FILTER(ALL(MyTable...
  • MattAllington's avatar
    8 years ago

    The filter portion of calculatetable always gets applied first, then the first parameter. It is not important if the first parameter is a variable or a native formula inside calculatetable in this case. You are first applying a filter and then removing it with all. 

     

    Maybe this

     

    calculatetable(mytable,filter(all(mytable),mytable[mycolumn]=“myvalue”))

  • MattAllington's avatar
    MattAllington
    8 years ago

    TL5866 wrote:

    Thanks. I was expecting that.

     

    Then how would you suggest to do something like this, which is not supported by FILTER ?

    MyFilteredTable = FILTER(ALL(MyTable), VALUES(MyColumn))

     


    MyFilteredTable = calculatetable(mytable,ALL(MyTable), VALUES(MyColumn))