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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.