Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AFra
Helper III
Helper III

Create new table that summarizes table A filtered by table B

Hi all, 

 

I have a table A : 

ProjectStatusKPI sales
Astarted12
Aended70
Bstarted26
Bended40
Cstarted23
Cended120

 

And a table B : 

ProjectStatus

A

started
Bended
Cended

 

I need to create a table C that summarizes A (Project and KPI sales) filtred by B (status), such as : 

ProjectKPI sales

A

12
B40
C120

 

I guess it will be something like 

New table = summarize(filter... status from A = status from B)...  but I can't get it right. 

 

Thanks in advance for your help! 

Ana 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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]))

 

 

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @AFra ,

 

Second formula should work, has the problem be solved?

If it works for you, please consider to mark it as solution.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@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]))

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.