Forum Discussion

AFra's avatar
AFra
Icon for Helper III rankHelper III
5 years ago
Solved

Create new table that summarizes table A filtered by table B

Hi all,    I have a table A :  Project Status KPI sales A started 12 A ended 70 B started 26 B ended 40 C started 23 C ended 120   And a table B :  Proj...
  • amitchandak's avatar
    5 years ago

    AFra , If they joined on project Id then try first one


    summarize(filter('table A', 'table A'[Status] ='table B'[Status] ), 'table A'[Project] , "sales" ,Sum('table A'[sales]))

     

    or

     

     

    summarize(filter(crossjoin('table A',selectcolumns('tableb', "pj" ,[Project], "st",[Status] )), [Status] =[St] && [Project] =[pj] ), 'table A'[Project] , "sales" ,Sum('table A'[sales]))