Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

The difference between filter function and a filter in CALCULATE function

Hi! I always thank the members of the community.   I have a question.   Filter function and CALCULATE(<extension>, <filter1>, <filter2>...) I wonder what is different.     If you know anyone,...
  • themistoklis's avatar
    7 years ago

    Anonymous

     

    Filters are enclosed in other functions so as to filter the results which can be measures or dimensions.

    Measure =                                                                       
    CALCULATE (
        SUM ( Table[value] ),
        FILTER ( Table, Table[City] = [selected city] )
    )

     

    As a standalone function it can only be used to create a table with filtered rows

    Table_New = FILTER('Table', 'Table'[User_ID] = "Ted")