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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Markando
Frequent Visitor

Summarize table depending on several fact tables

I have built a table containg all active teams and their corresponding sales, shipments and cases which works fine. The goal is to create a table with only active teams which I can then use as a slicer and make it a bit more user friendly

 

However it would be even better if I didn't have to make my calculations (SUMx3), but I can't get it working when the team code is in three different fact tables. Do anyone know how I can recreate  this table with only all distinct Team[Code] that is available in the three fact tables?

 

My current DAX-code:

 

SUMMARIZECOLUMNS(

Team[Code];Team[Name];
"SUM OF SALES";calculate(sum(Sales[SalesAmount]));
"SUM OF CASES";calculate(countrows('Cases'));
"SUM OF SHIPMENTS";calculate(sum(Shipment[Shipments]))

)

6 REPLIES 6
vanessafvg
Super User
Super User

@Markando you could create one table with the combined code values create a relationship between all the tables and the new lookup table and then summarize?

 

be best do it in power query / query editor.

 

duplicate all the tables, remove everythign except the code column, append them together and then deduplicate, add it to your model and create a relationship.  not sure if that will do it but it might





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hi Vanessafvg, thanks for your reply. 


The powerquery works fine, however I would prefer to do it in dax. I know how I put in a table in the summarizefunction, however for this case i need to build a new tablefunction containg the distinct team code value from three different fact-tables, its there I'm currently stuck. 

@Markando where are you summarising at the moment, in a new table?  or not ? sorry it would be best if i could see what you were actually doing? and the error or result you getting

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Hi

 

Im creating a new table. Let me try to show with a detailed summary:

I got five tables as below:

 

TEAM 
CodeName
1A
2B
3C
4D
  
CUSTOMERS 
CustomerCodeTeamCode
11
22
33
44
  
Sales 
CustomerCodeAmount
11000
  
Shipments 
CustomerCodeShipments
2400
  
Cases 
CustomerCodeShipments
35000

 

 

What I want to do is create a new table with all teams that has been active in either of the Sales, shipments or cases table. The primary key in these tables are customerCode. All CustomerCode is related to a single teamcode. 

 

My DAX above works perfect and I get this table:

 

TeamCodeTeamNameSUM OF SALESSUM OF CASESSUM OF SHIPMENTS
1A1000  
2B  400
3C 5000 

 

 

However I would like the same table, but withouth the summing. If I remove the sums I get a summarize over the entire team-table and thus also showing team D.

Hi @Markando,

 

Why don't you want to use SUMMARIZE()? 

 

Per my understanding about your issue, the SUMMARIZE() should be the easiest way to achieve your requirement since you don't want to use Power Query.

 

Thanks,
Xi Jin.

Hi

 

I'm more then happy to use summarize()! However my question is how do i use a filter in either summarize or summarizecolumns to get a list as below depending on all the team-values that exist in either of the three fact tables

 

 

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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