Forum Discussion

Arne's avatar
Arne
Frequent Visitor
6 years ago
Solved

Filter solution

Hi! From the example below i would like to filter sales in period 2020-01 where sales is more than 80. But i would likte to get all periods for companys that have sales of more than 80 in period 202...
  • camargos88's avatar
    camargos88
    6 years ago

    Hi Arne ,

    Try this measure:

     

    Measure 2 =

    VAR _company = SELECTCOLUMNS(FILTER(ALL('Table (3)'); 'Table (3)'[Sales] > 80 && 'Table (3)'[Period] = DATE(2020; 1;1)); "Company"; 'Table (3)'[Company])
    RETURN SUMX(FILTER('Table (3)'; 'Table (3)'[Company] IN _company); 'Table (3)'[Sales])
     
     
     
     
     
    Ricardo